gcc vs. clang: symbol stripping

烈酒焚心 提交于 2019-12-10 02:21:10

问题


gcc and AMD Open64 opencc both have a -s option to "strip symbol table and relocation information". So far I haven't been able to find the same option in Clang/LLVM. Does it exist?


回答1:


You can use a strip utility from binutils.

Actually, a llvm-ld has this options http://llvm.org/cmds/llvm-ld.html

-strip-all, -s Strip all debug and symbol information from the executable to make it smaller.

-strip-debug, -S Strip all debug information from the executable to make it smaller.

opt have something too:

-strip-debug This option causes opt to strip debug information from the module before applying other optimizations. It is essentially the same as -strip but it ensures that stripping of debug information is done first.



来源:https://stackoverflow.com/questions/6085491/gcc-vs-clang-symbol-stripping

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!