Re:Why has Plan 9 chosen statically linked binaries instead ...
by jacquesm on Friday February 15, 2019 @09:38AM
(#19171217)
You want -flto and to strip the binary of symbols if you are looking for a small executable size. The C runtime is about 800K.
[ Parent
| on HN ]
Re:Why has Plan 9 chosen statically linked binaries instead ...
by tom_mellior on Friday February 15, 2019 @09:53AM
(#19171334)
-flto combined with -static doesn't seem to do anything for me:
$ gcc -O3 foo.c -flto -static -o foo
$ du -sh foo
828K foo
$ strip foo
$ du -sh foo
760K foo
Could you post a complete command line and the version of the compiler you have showing how to make this work with static linking?