以ELF二进制文件导入名称 [英] Import names in ELF binary

查看:229
本文介绍了以ELF二进制文件导入名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ELF格式在哪里存储导入函数的名称?是否总是可以枚举所有导入名称,例如PE可执行文件?

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

例如,如果二进制文件使用 printf 是否有可能告诉它,只是通过二进制本身的静态分析?

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

推荐答案

在ELF中它们被称为未定义的符号。您可以通过以下方式查看未定义符号列表:

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文件未指定哪些符号来自哪些库;它只是添加了一个链接到ELF二进制文件的共享库列表,并允许链接器在库中找到符号。

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.

这篇关于以ELF二进制文件导入名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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