Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Readelf
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{context|date=July 2018}} '''readelf''' is a program for displaying various information about [[object file]]s on [[Unix]]-like systems, similar to [[objdump]]. It is part of the [[GNU Binutils|GNU binutils]]. == readelf and objdump == {{Tone|date=July 2024|section}} Both programs are capable of displaying the contents of [[Executable_and_Linking_Format|ELF]] format files. objdump sees an ELF file through a [[Binary_File_Descriptor_library|BFD]] filter. If BFD has a bug where 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.<ref>{{Cite web|url=https://github.com/bminor/binutils-gdb/blob/master/binutils/readelf.c|title=readelf vs. objdump: why are both needed" on binutils-gdb|last=|first=|date=|website=[[GitHub]]|archive-url=|archive-date=|access-date=}}</ref> == Example == The following command displays the contents of the file's dynamic section (to examine the [[Library (computing)|shared library]] dependencies and [[rpath]]):<ref>{{Cite web|title=readelf(1) - Linux manual page|url=https://man7.org/linux/man-pages/man1/readelf.1.html|access-date=2021-04-09|website=man7.org}}</ref><syntaxhighlight lang="console"> $ readelf -d <file name> </syntaxhighlight> ==References== {{reflist}} [[Category:Unix programming tools]] [[Category:GNU Project software]] {{unix-stub}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Ambox
(
edit
)
Template:Cite web
(
edit
)
Template:Context
(
edit
)
Template:DMCA
(
edit
)
Template:Reflist
(
edit
)
Template:Tone
(
edit
)
Template:Unix-stub
(
edit
)