objdump常用用法

验证二进制文件中是否有debug信息,也即编译的时候,是否使用了“-g”选项

objdump --debugging <binary-file>

<binary-file>可以是 .o, .a, .so 可执行文件等均可

带了“-g”选项的,会有如下字样

Contents of the .debug_aranges section:

...

Contents of the .debug_info section:

...

Contents of the .debug_str section:

...

Contents of the .debug_abbrev section:

...

[admin@host-11-20-51-205 bin]$ objdump --debugging ./common/_objs/common/json_parse.pic.o | grep Contents
Contents of the .debug_info section:
Contents of the .debug_abbrev section:
Contents of the .debug_aranges section:
Contents of the .debug_ranges section:
Contents of the .debug_str section:
Contents of the .eh_frame section:

 

posted @ 2020-05-28 00:04  不写诗的诗人小安  阅读(652)  评论(0编辑  收藏  举报