Why shows readelf on an ARM binary an odd entry point address?

流过昼夜 提交于 2019-12-01 13:18:58

Yes addresses are odd because they are Thumb functions, which is a simple question, however why two tools report differently to me is a good question.

readelf on purpose doesn't use BFD (unlike objdump) and mostly used to verify other tools against.

Here:

The difference between readelf and objdump: Both programs are capable of displaying the contents of ELF format files, so why does the binutils project have two file dumpers ?

The reason is that objdump sees an ELF file through a BFD filter of the world; if BFD has a bug where, say, it disagrees about a machine constant in e_flags, then the odds are good that it will remain internally consistent. The linker sees it the BFD way, objdump sees it the BFD way, GAS sees it the BFD way. There was need for a tool to go find out what the file actually says.

This is why the readelf program does not link against the BFD library - it exists as an independent program to help verify the correct working of BFD.

There is also the case that readelf can provide more information about an ELF file than is provided by objdump. In particular it can display DWARF debugging information which (at the moment) objdump cannot.

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