我需要了解我正在从事的一个项目的ELF文件布局,我注意到了这些工具的存在.

推荐答案

来自binutils/readelf.c:

 /* The difference between readelf and objdump:

   Both programs are capabale 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.  */

Linux相关问答推荐

当页面对齐关闭时,x86—64上的对象中的成员初始化器的Clang代码生成错误?

在Linux中随机化txt文件但保证不重复行

Bash shell 脚本未通过 TRUE 条件

Git在某些文件中添加回车符,尽管autocrlf已关闭

如何比较 2 个文件并将第二个文件的所有行打印到输出文件 awk

$RANDOM 变量在输出通过管道后似乎没有改变

如何为命令的所有选项启用无密码 sudo?

docker rm 命令在具有相同操作系统的不同机器上返回不同的状态码

在android上使用lldb-server进行lldb调试?

Azure Nvidia 中的 apt-update 给出公钥错误

如何在 Linux 中获取 C/C++ 中的用户名?

我在哪里放置第三方库来设置 C++ Linux 开发环境?

使用 ssh 判断远程主机上是否存在文件

docker images显示图像,docker rmi表示没有这样的图像或参考不存在

列出当前目录和所有子目录中特定大小的文件

如何在 Linux 上取消关机?

Anaconda 安装后,conda 命令失败并显示ImportError: no module named conda.cli

env和set(在 Mac OS X 或 Linux 上)有什么区别?

System.currentTimeMillis 是否总是返回一个值 >= 以前的调用?

在我的 index.php 中加载 CSS 和 JS 等资源时出现错误 403