[GHC] #10779: .so files in 64-bit Debian builds are 4% larger than they have to be
GHC
ghc-devs at haskell.org
Wed Aug 19 14:58:35 UTC 2015
#10779: .so files in 64-bit Debian builds are 4% larger than they have to be
-------------------------------------+-------------------------------------
Reporter: thomie | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Build System | Version: 7.10.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by thomie):
Below, filepath-ubuntu.so is from hvr's ppa build of ghc-7.10.2 (exact
file mentioned above), filepath-debian.so is from the Debian download.
{{{
$ size -A filepath-ubuntu.so filepath-debian.so
filepath-ubuntu.so :
section size addr
.note.gnu.build-id 36 400
.gnu.hash 2564 440
.dynsym 8976 3008
.dynstr 26101 11984
.gnu.version 748 38086
.gnu.version_r 32 38840
.rela.dyn 12816 38872
.rela.plt 96 51688
.init 26 51784
.plt 80 51824
.text 60569 51904
.fini 9 112476
.rodata 278 112488
.eh_frame 4 112768
.init_array 8 2210792
.fini_array 8 2210800
.jcr 8 2210808
.dynamic 624 2210816
.got 400 2211440
.got.plt 56 2211840
.data 6624 2211896
.bss 8 2218520
Total 120071
filepath-debian.so :
section size addr
.note.gnu.build-id 36 400
.hash 2556 440
.gnu.hash 2564 3000
.dynsym 8976 5568
.dynstr 26101 14544
.gnu.version 748 40646
.gnu.version_r 32 41400
.rela.dyn 12816 41432
.rela.plt 72 54248
.init 14 54320
.plt 64 54336
.text 60596 54400
.fini 9 114996
.rodata 278 115008
.eh_frame_hdr 20 115288
.eh_frame 68 115312
.init_array 8 2215936
.fini_array 8 2215944
.jcr 8 2215952
.dynamic 640 2215960
.got 400 2216600
.got.plt 48 2217000
.data 6624 2217048
.bss 8 2223672
.comment 39 0
Total 122733
}}}
filepath-debian.so contains additional `.hash`, `.eh_frame_hdr` and
`.comment` sections. After removing those, the `size` utility reports a
similar file size as it does for filepath-ubuntu.so:
{{{
$ strip -R .hash -R .eh_frame_hdr -R .comment filepath-debian.so
$ size filepath-debian.so
text data bss dec hex filename
112394 7736 8 120138 1d54a filepath-debian.so
}}}
But the file did not get much smaller. I don't understand why not.
{{{
$ wc -c filepath-debian.so
128456 filepath-debian.so
}}}
My system:
{{{
$ ld --version # Binutils also provides `size` and `strip`.
GNU ld (GNU Binutils for Ubuntu) 2.24
$ gcc --version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10779#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list