Necessary code or trash?

Frank Ruell stoerte at dreamwarrior.net
Thu Aug 28 11:18:51 PDT 2003


Denis Troshin <weiv at mail.ru> writes:

> Why most of bin (sbin) utilities are so big.

Do a "file /bin/rm" for example. They are linked static, so they don't
depend on any libs, but are bigger because of that.

Just try it for yourself. A simple hello world program: 
~$ gcc -o hello hello.c
~$ ls -lh hello
-rwxr-xr-x  1 stoerte  stoerte  4.4K Aug 28 20:15 hello*
~$ gcc -static -o hello hello.c
~$ ls -lh hello
-rwxr-xr-x  1 stoerte  stoerte    70K Aug 28 20:16 hello*

cheers,
Frank


More information about the freebsd-questions mailing list