Hello all.
For my own peculiar reasons, I need to compile something statically.
This might appear to be a trivial question, but after quite a few trials
it seems like I can't find the right words to ask google with. So I ask you.
Here is my program. I hope you can inderstand what it does, despite lack
of comments... ;)
#include <stdio.h>
int main() {
puts("Hello, world\n");
}
And here's my little session:
[EMAIL PROTECTED] helloworld]$ gcc -static -o hello hello.c
[EMAIL PROTECTED] helloworld]$ ls -l hello
-rwxrwxr-x 1 eli eli 441940 Mar 6 21:05 hello*
[EMAIL PROTECTED] helloworld]$
As you can see, this little program takes 440 kB. Hmmm. Why does this
look too much to me?
I mean, even without glibc and other wonders, surely one could implement
"puts" with less?
Any suggestions of how to shrink this down to some normal size?
Thanks in advance,
Eli
--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]