On Sun, Dec 30, 2007 at 01:52:56PM +0100, Thomas Klausner wrote: > On Sat, Dec 29, 2007 at 07:07:04PM +0000, David Laight wrote: > > On Wed, Dec 26, 2007 at 10:47:55AM +0100, Thomas Klausner wrote: > > > Hi! > > > > > > When I build qt4-libs on 4.99.42/amd64, I get huge static libraries: > > > > > > -rw-r--r-- 1 root wheel 212102348 Dec 22 02:40 qt4/lib/libQtGui.a > > > > > > I.e. the QtGui one is over 200MB big. > > > > Two questions: > > > >1) what does 'size' say ? > > text data bss dec hex filename > 6994 0 0 6994 1b52 qdrawhelper_mmx.o (ex > work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.a) ... > 232373 8 8 232389 38bc5 qrc_qstyle.o (ex > work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.a) Adding all the sizes probably only gives a few MB of code+text > For the .so, it's: > text data bss dec hex filename > 7976353 294280 6744 8277377 7e4d81 > work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.so.4.3.3 > > >2) are they built with -g ? > > Yes (but the link step doesn't have it): The difference in the 'file size' v 'code+data' is almost certainly the 'eh_frame' section - which contains the addresses each time the stack offset changes (needed for C++ exceptions, and used for stack backtraces). Th 'eh_frame' section is loadable, but not normally paged in. It cannot be stripped out by 'ld' or 'objcopy' because the section contains symbols referenced by the code. > Another weirdness: > The (not installed) files in the work dir are recognized by file(1): > # file work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.so.4.3.3 > work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.so.4.3.3: ELF > 64-bit LSB shared object, x86-64, version 1 (SYSV), for NetBSD 4.99.42, not > stripped > # file work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.a > work.x86_64/qt-x11-opensource-src-4.3.3/lib/.libs/libQtGui.a: current ar > archive > > The installed ones aren't: > # file /usr/pkg/qt4/lib/libQtGui.so.4.3.3 > /usr/pkg/qt4/lib/libQtGui.so.4.3.3: data, for NetBSD 4.99.42, not stripped > # file /usr/pkg/qt4/lib/libQtGui.a > /usr/pkg/qt4/lib/libQtGui.a: data > > Bug in file(1)? NFI David -- David Laight: david%l8s.co.uk@localhost