Find out the ld
option to automatically strip symbol table after linking.
man ld
suggests -s
option:
-s
--strip-all
Omit all symbol information from the output file.
-S
--strip-debug
Omit debugger symbol information (but not all symbols) from the output file.