[uClibc] Large files when compiling for MIPSEL target

Dave Dodge dododge at dododge.net
Mon Dec 27 22:41:21 UTC 2004


On Mon, Dec 27, 2004 at 12:33:59PM +0100, Roland Zitzke wrote:
> The produced code runs without any problems on the mipsel target but I 
> noted that even a tiny "hello world" program is about 65k in size.

According to readelf there appears to be a large (about 63K) gap
between the .eh_frame and .ctors sections.  This gap is filled with
null bytes; in fact on-disk it could conceivably be a sparse file.
The .ctors section ends up starting at exactly 64K into the file, so
that might be done intentionally for alignment reasons.  I don't
really know enough about ELF and Linux loading to say for sure,
though.

There was an article somewhere a while back that discussed executable
sizes in Linux and played all sorts of tricks with ELF sections to
shrink a hello-world executable down to tens of bytes.  Unfortunately
I can't seem to find it.

                                                  -Dave Dodge



More information about the uClibc mailing list