Jump to content

Readelf

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Dokidaki-ylc (talk | contribs) at 01:12, 9 April 2021 (Add example readelf usage to examine dynamic section of a file (e.g., shared library and rpath)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

readelf is a program for displaying various information about object files on Unix-like systems such as objdump. It is part of the GNU binutils.

readelf and objdump

objdump has a similar function but with different features like disassembling. The main difference is that readelf does not depend on BFD and helps to check if BFD works.[1]

Example

The following command displays the contents of the file's dynamic section (to examine the shared library dependencies and rpath): [2]

$ readelf -d <file name>

References

  1. ^ "readelf vs. objdump: why are both needed" on StackOverflow".
  2. ^ "readelf(1) - Linux manual page". man7.org. Retrieved 2021-04-09.