- Memory listing from gcc
- Posted by Paul Burke on March 27th, 2006
I've read the F manuals and I'm still no wiser... anyone know how I can
get a memory usage listing from gcc (I'm using msp430-gcc)? I've tried
-fmem-report, doesn't not do nowt.
Paul Burke
- Posted by John Devereux on March 27th, 2006
Paul Burke <paul@scazon.com> writes:
How about the "size" command? Or you can get detailed listings with
objdump. Both of these operate on the compiled object files.
--
John Devereux
- Posted by David R Brooks on March 27th, 2006
John Devereux wrote:
listing"?
- Posted by Hans-Bernhard Broeker on March 27th, 2006
Paul Burke <paul@scazon.com> wrote:
Generally you can't --- because it's not the job of gcc to decide
about memory usage. That's done by the linker. Get a map file,
and/or run 'size' or 'objdump' on the resulting files.
--
Hans-Bernhard Broeker (broeker@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
- Posted by Tauno Voipio on March 27th, 2006
Paul Burke wrote:
If you're looking for assembly listings try adding
-Wa,-ahlms=myfile.lst
to the gcc compilation command line.
If you're looking for the big picture after linking,
get a linker map by adding
-Wl,-Map=myfile.map,--cref
to the gcc command line performing the final link.
If the module cross-reference produces too much output,
use the simpler form
-Wl,-Map=myfile.map
Please do not put any extra spaces in the switches or
they will be misunderstood by the toolchain.
HTH
--
Tauno Voipio
tauno voipio (at) iki fi
- Posted by CBFalconer on March 27th, 2006
Tauno Voipio wrote:
I use: gcc -gstabs+ -Wa,-ahldn -c | less
possibly with -Os, -O1, -O2 or -O3. The output can be redirected
to a file if you want to keep it around.
--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
- Posted by Paul Burke on March 28th, 2006
CBFalconer wrote:
Thanks everyone. There seem to be more switches vavailable that there
are chinese characters.
Paul Burke
- Posted by Tauno Voipio on March 28th, 2006
Paul Burke wrote:
Get the GNU assembler and linker documentation for these switches:
The gcc -Wa option passes the rest of the option
to the assembler (as or gas).
The same applies to the -Wl option, but the rest
is passed to the linker (ld).
HTH
--
Tauno Voipio
tauno voipio (at) iki fi