Import names in ELF binary

大憨熊 提交于 2019-12-23 10:07:11

问题


Where does the ELF format stores the names of imported functions? Is it always possible to enumerate all import names, like for PE executables?

For example, if a binary is using printf is it possible to tell it does, just by static analysis of the binary itself?


回答1:


In ELF they're called undefined symbols. You can view the list of undefined symbols by:

  • nm -D <file>|grep -w U

  • objdump -T <file>|grep "\*UND\*"

ELF files don't specify which symbols come from which libraries; it just adds a list of shared libraries to link to into the ELF binary, and lets the linker find the symbols in the libraries.



来源:https://stackoverflow.com/questions/10480657/import-names-in-elf-binary

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