How can I exclude source file metadata from output when compiling?
问题 For example: $ gcc -O3 foobar.c -o foobar $ grep 'foobar\.c' foobar Binary file foobar matches How can I exclude such unnecessary and revealing metadata from the output of gcc and other compilers? It appears regardless of whether the output is an assembly file, object file, or executable. 回答1: man strip(1) > strip -s a.out 来源: https://stackoverflow.com/questions/28377292/how-can-i-exclude-source-file-metadata-from-output-when-compiling