Bug 702 - mipsel a.out always more than 64 kbyte
Summary: mipsel a.out always more than 64 kbyte
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-01 16:19 UTC by Klaas de Waal
Modified: 2019-11-22 01:28 UTC (History)
2 users (show)

See Also:
Host:
Target: mipsel-unknown-linux-gnu
Build: i686-linux
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Klaas de Waal 2005-02-01 16:19:53 UTC
A small "hello world" program gives an executable of more than 64 kbyte when
linked with shared libraries. With binutils-2.14 the same "hello world" program
gives an executable of about 6 kbyte. 
Looking at the result of the following command:
readelf -a a.out | grep LOAD
shows that the LOAD entries in Program Headers now have an alignment of 0x10000
(64 kbyte)
The same command on an a.out generated with binutils-2.14 shows alignment of
0x1000 (4 kbyte)
The bintutils-2.14.91 also generates big a.out with alignment of 64 kbyte.
This suggests that the alignment value correlates with the a.out size.

Curious: on a.out binaries of X86 the alignment is 0x1000 but the executable
size is less than 4 kbyte (with binutils-2.15, as found on FC3).

For mipsel cross-compilation, I use a cross-compilation toolchain generated with
Dan Kegel's crosstools with the following parameters:
- crosstools-0.38-rc37
- gcc-3.3.3
- glibc-2.3.2
- binutils-2.14, 2.14.91 or 2.15
- linux-2.4.18
Comment 1 Alan Modra 2019-11-22 01:28:42 UTC
I believe this has been fixed, likely in 2006.  At least mips-linux-gcc generates files of size less than 64k in size.