Files
TheRock/compiler/amd-llvm/llvm/docs/CommandGuide/llvm-readelf.rst
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

247 lines
6.0 KiB
ReStructuredText

llvm-readelf - GNU-style LLVM Object Reader
===========================================
.. program:: llvm-readelf
SYNOPSIS
--------
:program:`llvm-readelf` [*options*] [*input...*]
DESCRIPTION
-----------
The :program:`llvm-readelf` tool displays low-level format-specific information
about one or more object files.
If ``input`` is "``-``", :program:`llvm-readelf` reads from standard
input. Otherwise, it will read from the specified ``filenames``.
OPTIONS
-------
.. option:: --addrsig
Display the address-significance table.
.. option:: --all, -a
Equivalent to specifying all the main display options relevant to the file
format.
.. option:: --arch-specific, -A
Display architecture-specific information, e.g. the ARM attributes section on ARM.
.. option:: --bb-addr-map
Display the contents of the basic block address map section(s), which contain the
address of each function, along with the relative offset of each basic block.
.. option:: --call-graph-info
Display the call graph section entries i.e. for each function
its identifying information, each of its direct callees' information
and for each indirect callee a 64-bit number representing the callee's
function signature. This information can be used to reconstruct
the program call graph.
.. option:: --cg-profile
Display the callgraph profile section.
.. option:: --decompress, -z
Dump decompressed section content when used with ``-x`` or ``-p``.
If the section(s) are not compressed, they are displayed as is.
.. option:: --demangle, -C
Display demangled symbol names in the output.
.. option:: --dependent-libraries
Display the dependent libraries section.
.. option:: --dynamic-table, --dynamic, -d
Display the dynamic table.
.. option:: --dyn-relocations
Display the dynamic relocation entries.
.. option:: --dyn-symbols, --dyn-syms
Display the dynamic symbol table.
.. option:: --elf-linker-options
Display the linker options section.
.. option:: --elf-output-style=<value>
Format ELF information in the specified style. Valid options are ``LLVM``,
``GNU``, and ``JSON``. ``LLVM`` output is an expanded and structured format.
``GNU`` (the default) output mimics the equivalent GNU :program:`readelf`
output. ``JSON`` is JSON formatted output intended for machine consumption.
.. option:: --extra-sym-info
Display extra information (section name) when showing symbols.
.. option:: --expand-relocs
When used with :option:`--relocations`, display each relocation in an expanded
multi-line format.
.. option:: --file-header, -h
Display file headers.
.. option:: --gnu-hash-table
Display the GNU hash table for dynamic symbols.
.. option:: --hash-symbols
Display the expanded hash table with dynamic symbol data.
.. option:: --hash-table
Display the hash table for dynamic symbols.
.. option:: --headers, -e
Equivalent to setting: :option:`--file-header`, :option:`--program-headers`,
and :option:`--sections`.
.. option:: --help
Display a summary of command line options.
.. option:: --hex-dump=<section[,section,...]>, -x
Display the specified section(s) as hexadecimal bytes. ``section`` may be a
section index or section name.
.. option:: --histogram, -I
Display a bucket list histogram for dynamic symbol hash tables.
.. option:: --memtag
Display information about memory tagging present in the binary. This includes
various memtag-specific dynamic entries, decoded global descriptor sections,
and decoded Android-specific ELF notes.
.. option:: --needed-libs
Display the needed libraries.
.. option:: --no-demangle
Do not display demangled symbol names in the output. On by default.
.. option:: --notes, -n
Display all notes.
.. option:: --offloading
Display list of HIP offload bundles.
.. option:: --pretty-print
When used with :option:`--elf-output-style`, JSON output will be formatted in
a more readable format.
.. option:: --program-headers, --segments, -l
Display the program headers.
.. option:: --relocations, --relocs, -r
Display the relocation entries in the file.
.. option:: --section-data
When used with :option:`--sections`, display section data for each section
shown. This option has no effect for GNU style output.
.. option:: --section-details, -t
Display all section details. Used as an alternative to :option:`--sections`.
.. option:: --section-groups, -g
Display section groups.
.. option:: --section-mapping
Display the section to segment mapping.
.. option:: --section-relocations
When used with :option:`--sections`, display relocations for each section
shown. This option has no effect for GNU style output.
.. option:: --sections, --section-headers, -S
Display all sections.
.. option:: --section-symbols
When used with :option:`--sections`, display symbols for each section shown.
This option has no effect for GNU style output.
.. option:: --stackmap
Display contents of the stackmap section.
.. option:: --stack-sizes
Display the contents of the stack sizes section(s), i.e. pairs of function
names and the size of their stack frames. Currently only implemented for GNU
style output.
.. option:: --string-dump=<section[,section,...]>, -p
Display the specified section(s) as a list of strings. ``section`` may be a
section index or section name.
.. option:: --symbols, --syms, -s
Display the symbol table. Also display the dynamic symbol table when using GNU output style for ELF.
.. option:: --unwind, -u
Display unwind information.
.. option:: --version
Display the version of the :program:`llvm-readelf` executable.
.. option:: --version-info, -V
Display version sections.
.. option:: --wide, -W
Ignored for GNU readelf compatibility. The output is already similar to when using -W with GNU readelf.
.. option:: @<FILE>
Read command-line options from response file `<FILE>`.
EXIT STATUS
-----------
:program:`llvm-readelf` returns 0 under normal operation. It returns a non-zero
exit code if there were any errors.
SEE ALSO
--------
:manpage:`llvm-nm(1)`, :manpage:`llvm-objdump(1)`, :manpage:`llvm-readobj(1)`