Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22046

ld64 -s strip output flag - "ignored" but not really? OS X

$
0
0

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 smallme@dinosaurhunter ~/bin/c> wc -c small   12564 smallme@dinosaurhunter ~/bin/c> gcc -Wall -s small.c -o smallld64: warning: option -s is obsolete and being ignoredme@dinosaurhunter ~/bin/c> wc -c small   12468 small

If the flag is obsolete and being ignored -- why do the size of the binaries differ?


Viewing all articles
Browse latest Browse all 22046

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>