Mail Archives: djgpp-workers/2003/01/16/07:05:17
I find the following in the FAQ:
> 8.20 How to get GCC to generate assembly code
> =============================================
>
> _*Q*: How can I peek at the assembly code generated by GCC?_
>
>
> _*Q*: How can I create a file where I can see the C code and its assembly
> translation together?_
>
... snip ...
>
> If you need to both get the assembly code _and_ to compile/link the program,
> you can either give the `-save-temps' option to GCC (which will leave all the
> temporary files including the `.s' file in the current directory), or use the
> `-Wa,aln=foo.s' option which instructs the assembler to output the assembly
> translation of the C code (together with the hex machine code and some
> additional info) to the file named after the `='.
the line "-Wa,aln=foo.s" above should be "-Wa,-aln=foo.s". This
is not clear from either the FAQ or the gcc/as info files. Found
by experimentation.
BTW, the option -alhn=foo.s is more instructive.
--
Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
- Raw text -