LinuxCommandLibrary

eu-readelf

Display information about ELF format files

TLDR

Display all extractable information contained in the ELF file

$ eu-readelf [[-a|--all]] [path/to/file]
copy

Display the contents of all NOTE segments/sections, or of a particular segment/section
$ eu-readelf [[-n|--notes]] [.note.ABI-tag] [path/to/file]
copy

SYNOPSIS

eu-readelf [options...] [elf-file...]

PARAMETERS

-a, --all
    Equivalent to: -h -l -S -s -r -d -V -A -D

-h, --file-header
    Display the ELF file header

-l, --program-headers, --segments
    Display the program headers

-S, --section-headers, --sections
    Display the sections' header

-s, --syms, --symbols
    Display the symbol table

-n, --notes
    Display the core notes (if present)

-r, --relocs
    Display the relocations (if present)

-u, --unwind
    Display unwind information (if present)

-d, --dynamic
    Display the dynamic section

-V, --version-info
    Display DT_VERSIONTAG entries (if present)

-A, --arch-specific
    Display architecture-specific information

-D, --use-dynamic
    Use dynamic symbol table only (if present)

-x <number|name>
    Hex-dump of section <number|name>

-p <number|name>
    Display content of program header <number|name>

-I, --histogram
    Display histogram of bucket list lengths

-W, --wide
    Allow output width beyond 80 characters

-N, --debug-dump[=note]
    Display DWARF debugging sections

-H, --help
    Display help information

-v, --verbose
    Increase verbosity in output

-VV, --version
    Display version information

DESCRIPTION

eu-readelf is a command-line utility from the elfutils package that analyzes and dumps information from ELF (Executable and Linkable Format) files used in Linux for executables, libraries, object files, and core dumps.

It reveals critical details like file headers, program and section headers, symbol tables, relocations, dynamic linking data, version info, and architecture-specific elements. Similar to readelf from binutils, it supports selective output via options or full dumps with -a.

Ideal for developers debugging binaries, reverse engineering, security analysis, or verifying compilation outputs. elfutils emphasizes correctness and performance, integrating with libraries like libelf and libdw for advanced ELF/DWARF handling. Output is human-readable with alignment for clarity, and wide mode supports broader displays.

Unlike some tools, it prioritizes standards compliance and handles malformed files gracefully.

CAVEATS

Output formatting may differ slightly from binutils readelf; limited support for some proprietary ELF extensions.

MULTI-FILE SUPPORT

Processes multiple ELF files; outputs separated by filenames.

ARCHITECTURE HANDLING

Supports common arches like x86, ARM, PPC; shows machine type in header.

HISTORY

Part of elfutils project started in 2003 by Red Hat (Ulrich Drepper et al.) as robust, standards-compliant ELF tools alternative to binutils.

SEE ALSO

readelf(1), objdump(1), nm(1), eu-nm(1), size(1)

Copied to clipboard