This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

crosstool-generated toolchain produces massive ELF executable


  (disclaimer:  i'm still poring over the build, trying to figure out
what's going on here, so i may not be as rigorous in my explanation as
i'd like to be.)

  scenario:  directory full of source that creates a relatively small
boot loader for an SH3eb system.  the final ELF executable as created
by a downloadable toochain from kpitgnutools.com is < 128K since
that's all of the flash that's allocated for it, so i know that that
toolchain produces a correct output executable.

  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.

  the entire final executable should be a single, statically-linked
program so i've added linker options like -nostdlib and so on, and the
two static libs are explicitly listed in the link command.  but that
final executable is still around 400K.

  any advice while i keep looking for what i did wrong?  thanks.

rday

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]