I was bored and playing around with various options to gcc to see what size binaries I could produce.
I found a -s
flag in ld64 that is supposedly supposed to not include symbol table information in an executable. The manpage for ld64 says the flag is ignored.
The manpage for gcc says it's a linker option(which to me implies it means it will just enable the -s
flag on ld64 when it's invoked) and mentions nothing about being ignored.
It's not seeming to be ignored, though...
me@dinosaurhunter ~/bin/c> cat small.c
int main(void) { return 1; }
me@dinosaurhunter ~/bin/c> gcc -Wall small.c -o small
me@dinosaurhunter ~/bin/c> wc -c small
12564 small
me@dinosaurhunter ~/bin/c> gcc -Wall -s small.c -o small
ld64: warning: option -s is obsolete and being ignored
me@dinosaurhunter ~/bin/c> wc -c small
12468 small
If the flag is obsolete and being ignored -- why do the size of the binaries differ?