gcc与clang:符号剥离 [英] gcc vs. clang: symbol stripping

查看:701
本文介绍了gcc与clang:符号剥离的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gcc和AMD Open64 opencc都具有-s选项来剥离符号表和重定位信息".到目前为止,我还没有在Clang/LLVM中找到相同的选项.它存在吗?

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?

推荐答案

您可以使用binutils中的strip实用程序.

You can use a strip utility from binutils.

实际上,llvm-ld具有此选项 http://llvm.org/cmds/llvm -ld.html

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

-strip-all,-s 从可执行文件中剥离所有调试和符号信息 使其更小.

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

-strip-debug,-S 将所有调试信息从可执行文件剥离到 缩小它.

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

选择也有一些东西:

-strip-debug 此选项导致选择在应用其他模块之前从模块中剥离调试信息 优化.它与-strip本质上相同,但可确保剥离调试 信息首先完成.

-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.

这篇关于gcc与clang:符号剥离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆