cross-compiled object sizes too big

Dan Kegel dank@kegel.com
Fri Oct 29 00:57:00 GMT 2004


David Wuertele wrote:
> I've been using crosstool-generated gcc-3.3.3 to build my mipsel
> targets, and I find that the file sizes are humungous.  After
> stripping the objects, I get file sizes that are up to TWICE as large
> as similarly generated gcc-2.96 code.  Do these sizes not look out of
> line?
> 
>    bytes          gcc-3.3.3 generated files
>   -------       --------------------------------
>   1884160	/lib/libc-2.3.2.so
>   1257472	/lib/libstdc++.so.5.0.5
>   1048576	/usr/local/lib/libfreetype.so.1314.0.0.10
>   1036288	/bin/busybox
>   1011712	/bin/bash
> 
>    bytes          gcc-2.96 generated files
>   -------       --------------------------------
>   1531904	/lib/libc-2.2.4.so
>   532480	/lib/libstdc++-3-libc6.2-2-2.10.0.so
>   495616	/usr/local/lib/libfreetype.so.1314.0.0.10
>   462848	/bin/busybox
>   847872	/bin/bash
> 
> Compiling with -Os helps, but doesn't get close to the file sizes I
> saw with my older cross-compiler.

We had a similar problem with sh4.  I seem to recall that
   $TARGET-strip --strip-unneeded $file
helped a bit more.  (Can't do that with every file, though.)
- Dan


-- 
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

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



More information about the crossgcc mailing list