Shared library size anomaly
Bryce McKinlay
bryce@mckinlay.net.nz
Thu Sep 25 09:14:00 GMT 2003
Here's something weird that I noticed while messing around with the
merge patch. A libgcj.so created by:
$ ld -r -o temp.o (all object files...)
$ gcj --shared temp.o -o libgcj.so
is some 400K smaller than one created with:
$ gcj --shared -o libgcj.so (all object files...)
Each of the libraries works fine. Examining with objdump revealed that
almost all the sections had slightly different sizes, however .rodata
seems to be accounting for most of the discrepancy:
- 11 .rodata 000a0599 005c6440 005c6440 005c6440 2**5
+ 11 .rodata 000f776b 005ca1e0 005ca1e0 005ca1e0 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
Any clues what would cause this? Could this be a constant merging bug?
This test was done with the merge patch applied, I havn't tried it
without the patch yet.
Regards
Bryce.
More information about the Binutils
mailing list