crosstool-generated toolchain produces massive ELF executable

Khem Raj
Mon Jan 30 18:28:00 GMT 2006

Robert P. J. Day said the following on 01/30/2006 07:25 AM:
>   when i use a crosstool-generated toolchain, the executable turns out
> to be almost 400K in size.  that executable is created by linking all
> of the object files with the static libs libc.a and libgcc.a, and the
> difference seems to be that the KPIT toolchain only links in those
> routines that are used, but the crosstool toolchain pulls in all kinds
> of unnecessary library routines, thus creating that overly-large final
> executable.
is the version of binutils same? ld might be doing a better job of 
unreferenced section removal in KPIT
there has been recent work done in ld in this area. Secondly you may 
inspect the linker map file to check which
sections are adding to size. It might be some tweak needed in linker 
script file.


Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list