Re: Debian shared libs use far more memory than required
On Thu, Aug 25, 2005 at 12:48:14AM +0200, Stephane Chauveau wrote:
>
> $ objdump -h -w libgtk-x11-2.0.so
>
> The section size is in the 3rd column
>
> DEBIAN PACKAGE FROM REPOSITORY:
> 11 .rodata 000840cb 000000000021a180 000000000021a180 ...
> 21 .data 000233c0 00000000003f1d60 00000000003f1d60 ...
>
> MY OWN RECOMPILED DEBIAN PACKAGE:
> 11 .rodata 000a43ad 00000000001f3180 00000000001f3180 ...
> 21 .data 00000748 00000000003f3460 00000000003f3460 ...
>
> That's 0x0233c0-0x748 = 140KB moved from shared to non-shared
I can reproduce this. Here a diff of all the changes in size:
-.text 1816104
+.text 1816184
-.rodata 540875
+.rodata 682673
-.data 144320
+.data 1864
-Total 3247680
+Total 3247102
> My first though was that the official debian package was probably
> compiled with a different version of gcc.
> However, I could not reproduce the official package size with gcc-3.3,
> gcc-3.4 and gcc-4.0 so the problem
> is probably elsewhere: libtool? binutils ?
>From the buildd log:
Toolchain package versions: libc6-dev_2.3.2.ds1-22 linux-kernel-headers_2.6.13+
0rc3-1 gcc-4.0_4.0.1-3 g++-4.0_4.0.1-3 binutils_2.16.1-2 libstdc++6-4.0-dev_4.0
.1-3 libstdc++6_4.0.1-3
And my first guess would be that libc6 is the reason,
since all the rest is basicly still the same upstream
version, but rebuilding it with it still gives about the
same results as now.
So I tried the same using gcc 4.0.1-3 instead of 4.0.1-6,
no difference at all.
I'll investigate this some more and hope to find an answer
soon.
Kurt
Reply to: