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]

Re: crosstool bloat




Dave Korn wrote:
----Original Message----

From: David Karlton
Sent: 18 September 2005 22:24


The build seems
to work, but when I compile anything with the resulting compiler, all my
output files are suddenly quite huge -- anything that would have
compiled very small with 0.28 (eg. a 5k binary under 0.28) is now right
around 68k, consistently, with 0.38.  I simply ran "sh ./demo-mipsel.sh"
after editing the script to create the desired build.

Any idea what may be causing the executables to be so large?


  Lots of things *could* cause it, all the way down the toolchain starting
at the compiler and ending with the linker.


I can't
recall what I had done in the installation for 0.28 to make the binaries
be "normal".  Is there an easy way to figure out what is getting
included into my builds?


  Yep, it's called objdump.  Compile a 'hello world' program with the old
and new compiler, and see what's different.

Being as far from a guru at this stuff as humanly possible, the best I could figure out was that the bloated programs have an additional section header named ".MIPS.stubs". I'm not sure how else to use objdump effectively. Forgive my inexperience with compilers and such... Is there another arg I should try to compare?


One thing I noticed was that if I compress the two programs (like with zip), then the zipped size is almost identical (and small) for each binary, even though unzipped they're 5k and 68k. Am I being naive by assuming that there's a lot of "dead air" in the bloated file and/or a lot of repeated values or something?

  My first guess would be that the new compiler is linking statically
against large chunks of glibc when the old one was linking against a shared
glibc.  Maybe a '--enable-shared' got left out of configure options
somewhere?


I don't see anything obvious within the setup for the crosstool build, nor any reference in the documentation that implies I need to do more than run the demo-mipsel.sh script. :-/


    cheers,
      DaveK

Thanks for the help so far!


dk


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


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