Subject: Why are my Linux binaries so huge?
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 03/17/2004 06:40:05
Using pkgsrc under Linux, the binaries are huge. For example:
-rwxr-xr-x 1 root root 8968811 Mar 8 22:42 /usr/bin/openssl
Then stripped:
-rwxr-xr-x 1 root root 950460 Mar 17 06:28 /usr/bin/openssl
But on a non-pkgsrc system:
-rwxr-xr-x 1 root root 268168 Sep 30 16:25 /usr/bin/openssl
On a pkgsrc system:
reed@puget:/usr/pkgsrc/databases/gramps$ file /usr/lib/libcrypto.so.300.0
/usr/lib/libcrypto.so.300.1
/usr/lib/libcrypto.so.300.0: ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), not stripped
/usr/lib/libcrypto.so.300.1: ELF 32-bit LSB shared object, Intel 80386,
version 1 (SYSV), not stripped
reed@puget:/usr/pkgsrc/databases/gramps$ ls -l /usr/lib/libcrypto.so.300.0
/usr/lib/libcrypto.so.300.1
-r-xr-xr-x 1 root root 936746 Sep 22 23:34
/usr/lib/libcrypto.so.300.0
-r-xr-xr-x 1 root root 7033221 Mar 8 22:42
/usr/lib/libcrypto.so.300.1
(I don't know the size differences above are so different.)
On a non-pkgsrc system:
-rw-r--r-- 1 root root 771908 Sep 30 16:25
/usr/lib/libcrypto.so.0.9.6
These files are just too large:
-r--r--r-- 1 root root 1954980 Oct 14 09:36
/usr/lib/libdb2.so.2.7
-rw-r--r-- 1 root root 3608562 Oct 14 09:36 /usr/lib/libdb2.a
-rwxr-xr-x 1 reed reed 7337373 Mar 6 20:44
/usr/lib/libdb4-4.2.so.2.52
-rwxr-xr-x 1 reed reed 8455036 Mar 6 20:46
/usr/lib/libdb4_cxx-4.2.so
-rw-r--r-- 1 reed reed 12971896 Mar 6 20:49 /usr/lib/libdb4.a
-rw-r--r-- 1 reed reed 12971896 Mar 6 20:49
/usr/lib/libdb4-4.2.a
-rw-r--r-- 1 reed reed 15147780 Mar 6 20:49
/usr/lib/libdb4_cxx.a
-rw-r--r-- 1 reed reed 15147780 Mar 6 20:49
/usr/lib/libdb4_cxx-4.2.a
I use gcc 3.x for these builds.
Any ideas on how to find out why they are so big?
Any ideas on how to have them be smaller?
I use strip to make smaller; in some cases it is automatic with pkgsrc.
But even when stripped files appear to way larger than on NetBSD or other
Linux system.)
Jeremy C. Reed
http://www.reedmedia.net/