Build a short executable
Peter Barada
pbarada@mail.wm.sps.mot.com
Tue Jan 9 09:07:00 GMT 2001
>>I removed the -g option to generate the cross libraries
>>(libg.a and libgcc.a) but not for my small files. I used -o2
>>everywhere and I obtained an executable file of 132656 bytes !
>
> Did you try using the 'strip' command from binutils on the output ? You'd
>be surprised how much difference it might make. It will be the main reason
>why your exe is so large.
>
Instead of strip, look at it with 'objdump --section-headers'
<foo.elf>. This will tell you the size of each of the sections in the
executable(and where they are loaded) without losing any of the
symbols from the executable.
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
More information about the crossgcc
mailing list