Re: Comments in assember output

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

 



Artur,

After thinking about this some more, I believe the problem is that the "-S" flag tells the driver (gcc) to stop after the compiler generates the assembly code. In other words, it never actually runs the assembler.

And since the assembler is the process that generates the listing file, no listing output is ever generated.

I do not know why the mixed source/assembly listing is generated by the assembler, rather than the compiler, but I am sure there is a good technical reason for that, possibly having to do with optimizations made by the assembler. :)

--
Tony Wetmore
Solipsys Corporation (http://www.solipsys.com)
mailto:tony.wetmore@xxxxxxxxxxxx


Artur Krzysztof Szostak wrote:
Something like
<transcript>
cas$ g++ -c -g -O3 -Wa,-ahl=cas.s cas.c
cas$ sed -n /func/,40p cas.s

This works thank you.
But I wonder why should not work with
g++ -S -g -O3 -Wa,-ahl=cas.s cas.c
like I was trying.



[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