分离debug信息的命令

# 分离debug信息的命令
# a) 提取debug信息
objcopy --only-keep-debug helloworld helloworld.debug
# b) 剥离debug信息
strip --strip-debug --strip-unneeded helloworld
# c) 增加section .gnu_debuglink链接(core的时候能定位到各变量的信息)
objcopy --add-gnu-debuglink=helloworld.debug helloworld

 

posted @ 2022-09-06 16:52  不写诗的诗人小安  阅读(53)  评论(0编辑  收藏  举报