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.