Reputation: 40568
As part of learning MIPS assembly, I want to cross compile some C source files with LCC and then disassemble them. I found a MIPS disassembler that runs on Windows, but it says in the description:
Disassembles pure memory dumps (raw code) and GCC object files
I know that for x86 there are multiple executable / object file formats depending on the target OS. Is this the case for MIPS? Do you think this will work? Or am I going to be stuck having to install a linux distro so that I can use one of the precompiled gcc MIPS toolchains like CodeSourcery?
Upvotes: 2
Views: 3311
Reputation: 6266
To answer the original question, Linux on MIPS uses ELF format files for executables and shared objects. Bare metal MIPS systems would likely use some form of memory dump.
The objdump utility from the GNU codesourcery toolchain will disassemble ELF files and GCC .o
files.
Upvotes: 1
Reputation: 39807
It looks like lcc
supports the -S
compiler option, which emits the assembly output. Perhaps that would save you some effort?
Executable formats are always according to the operating system and compiler (which obviously must work hand-in-hand). If you decide you need to use gcc, http://faculty.cs.tamu.edu/bettati/Courses/410/2006C/Projects/gxemulcygwin.html appears to discuss a means of installing one under Win32 through cygwin.
Upvotes: 1