Oron Peled wrote:

Yes, but that's what we have dietlibc for.

Now, that's what I call an ANSWER.

Watch this:

[EMAIL PROTECTED] helloworld]$ gcc -O2 -static -o hello hello.c
[EMAIL PROTECTED] helloworld]$ ls -l hello
-rwxrwxr-x 1 eli eli 441940 Mar 7 11:21 hello*
[EMAIL PROTECTED] helloworld]$ strip hello
[EMAIL PROTECTED] helloworld]$ ls -l hello
-rwxrwxr-x 1 eli eli 373248 Mar 7 11:21 hello*
[EMAIL PROTECTED] helloworld]$ diet gcc -O2 -static -o hello hello.c
[EMAIL PROTECTED] helloworld]$ ls -l hello
-rwxrwxr-x 1 eli eli 1827 Mar 7 11:22 hello*
[EMAIL PROTECTED] helloworld]$ strip hello
[EMAIL PROTECTED] helloworld]$ ls -l hello
-rwxrwxr-x 1 eli eli 792 Mar 7 11:22 hello*
[EMAIL PROTECTED] helloworld]$ ./hello
Hello, world

[EMAIL PROTECTED] helloworld]$ ldd hello
not a dynamic executable

792 bytes is fair and square for "Hello world", don't you think?

Thank you very much, Oron.

Eli



--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]




Reply via email to