This is the mail archive of the gcc@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: How to let GCC produce flat assembly


Li Wang wrote:
and execute it. If I want to let GCC produce assembly for it, how should
I code the machine description file? Should I first let cc1 produce a
elf assembly for it, and then let binutils trunate it to a flat
assembly? It seems ugly hacking. Thanks.

I don't know what a .com file is, but you can use objcopy from binutils to convert between file formats. You could use objcopy to convert an ELF file into a binary file by using "-O binary" for instance. See the objcopy documentation. The binary file format may be what you are looking for.


If you want code without function calls, then you would have to write a C program without any function calls. Neither gcc nor binutils will help you there.
--
Jim Wilson, GNU Tools Support, http://www.specifix.com



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