Re: mark.urs@xxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark U kirjoitti:
Hi,

I'm just curious to know whether there is any option in GNU GCC to get
the C code  and the corresponding asembly.
The problem with this issue is that it is explained in the GNU assembler manual, not in the GCC manual :-( The expectation however seems to be that it is explained
in the GCC manual !  Anyhow the 'as' manual tells in the Chapter 2 :

"If you are invoking as via the gnu C compiler, you can use the `-Wa' option to pass arguments through to the assembler. The assembler arguments must be separated
from each other (and the `-Wa') by commas. For example:
gcc -c -g -O -Wa,-alh,-L file.c
This passes two options to the assembler: `-alh' (emit a listing to standard output with high-level and assembly source) and `-L' (retain local symbols in the symbol table)."

The debug option '-g' causes the row number and source info being added into the output for 'as'. The listing comes to the standard output so a redirection into a file can
be a better solution....


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux