Why does the compiler version appear in my ELF executable?

后端 未结 6 822
说谎
说谎 2021-01-04 04:43

I\'ve recently compiled a simple hello world C program under Debian Linux using gcc:

gcc -mtune=native -march=native -m32 -s -Wunused -O2 -o hello hello.c
         


        
6条回答
  •  庸人自扰
    2021-01-04 04:54

    It appears that you'd be able to 'just' strip that if you don't want it; See this page for a nice run-down.

    http://timelessname.com/elfbin/

    Note that the page (of course) also resorts to using assembly, which you may not want to do, but the general gist applies

提交回复
热议问题