This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Issues with gcc -S output format


Kerrick Staley <mail@kerrickstaley.com> writes:

> I can successfully compile the programs and convert them into a raw
> binary format for use with the processor I designed, but I now need to
> also run the programs on the MARS simulator in order to check the
> accuracy of my processor implementation. The MARS simulator will only
> accept assembly source code as input (and not raw binary or object
> files), so I tried using -S to produce the assembly code for the
> programs. The problem is that MARS does not understand macros such as
> %lo and %hi (although it does have basic support for directives), so
> the code won't run. I also tried using objdump to disassemble the
> object file, but it inserts a bunch of extra junk such as instruction
> addresses.
>
> How can I get the raw assembly code in a simple format (that MARS can parse)?

I suppose you could try -mno-explicit-relocs.  I would not be at all
surprised if it no longer works, though, as I doubt anybody tests it.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]