'br}

'br}

{\

## NAME

readelf - Displays information about ELF files.

## SYNOPSIS

readelf [-a|--all] [-h|--file-header] [-l|--program-headers|--segments] [-S|--section-headers|--sections] [-g|--section-groups] [-t|--section-details] [-e|--headers] [-s|--syms|--symbols] [--dyn-syms] [-n|--notes] [-r|--relocs] [-u|--unwind] [-d|--dynamic] [-V|--version-info] [-A|--arch-specific] [-D|--use-dynamic] [-x <number or name>|--hex-dump=<number or name>] [-p <number or name>|--string-dump=<number or name>] [-R <number or name>|--relocated-dump=<number or name>] [-c|--archive-index] [-w[lLiaprmfFsoRt]| --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]] [--dwarf-depth=n] [--dwarf-start=n] [-I|--histogram] [-v|--version] [-W|--wide] [-H|--help] elffile...

## DESCRIPTION

readelf displays information about one or more s-1ELFs0 format object files. The options control what particular information to display.

elffile... are the object files to be examined. 32-bit and 64-bit s-1ELFs0 files are supported, as are archives containing s-1ELFs0 files.

This program performs a similar function to objdump but it goes into more detail and it exists independently of the s-1BFDs0 library, so if there is a bug in s-1BFDs0 then readelf will not be affected.

## OPTIONS

The long and short forms of options, shown here as alternatives, are equivalent. At least one option besides -v or -H must be given.

\fB-a\fR 4

\fB--all\fR 4

Equivalent to specifying --file-header, --program-headers, --sections, --symbols, --relocs, --dynamic, --notes and --version-info.

\fB-h\fR 4

\fB--file-header\fR 4

Displays the information contained in the s-1ELFs0 header at the start of the file.

\fB-l\fR 4

\fB--program-headers\fR 4

\fB--segments\fR 4

Displays the information contained in the file's segment headers, if it has any.

\fB-S\fR 4

\fB--sections\fR 4

\fB--section-headers\fR 4

Displays the information contained in the file's section headers, if it has any.

\fB-g\fR 4

\fB--section-groups\fR 4

Displays the information contained in the file's section groups, if it has any.

\fB-t\fR 4

\fB--section-details\fR 4

Displays the detailed section information. Implies -S.

\fB-s\fR 4

\fB--symbols\fR 4

\fB--syms\fR 4

Displays the entries in symbol table section of the file, if it has one.

\fB--dyn-syms\fR 4

Displays the entries in dynamic symbol table section of the file, if it has one.

\fB-e\fR 4

\fB--headers\fR 4

Display all the headers in the file. Equivalent to -h -l -S.

\fB-n\fR 4

\fB--notes\fR 4

Displays the contents of the s-1NOTEs0 segments and/or sections, if any.

\fB-r\fR 4

\fB--relocs\fR 4

Displays the contents of the file's relocation section, if it has one.

\fB-u\fR 4

\fB--unwind\fR 4

Displays the contents of the file's unwind section, if it has one. Only the unwind sections for s-1IA64 ELFs0 files, as well as s-1ARMs0 unwind tables (f(CW*(C`.ARM.exidx*(C' / f(CW*(C`.ARM.extab*(C') are currently supported.

\fB-d\fR 4

\fB--dynamic\fR 4

Displays the contents of the file's dynamic section, if it has one.

\fB-V\fR 4

\fB--version-info\fR 4

Displays the contents of the version sections in the file, it they exist.

\fB-A\fR 4

\fB--arch-specific\fR 4

Displays architecture-specific information in the file, if there is any.

\fB-D\fR 4

\fB--use-dynamic\fR 4

When displaying symbols, this option makes readelf use the symbol hash tables in the file's dynamic section, rather than the symbol table sections.

\fB-x <number or name>\fR 4

\fB--hex-dump=<number or name>\fR 4

Displays the contents of the indicated section as a hexadecimal bytes. A number identifies a particular section by index in the section table; any other string identifies all sections with that name in the object file.

\fB-R <number or name>\fR 4

\fB--relocated-dump=<number or name>\fR 4

Displays the contents of the indicated section as a hexadecimal bytes. A number identifies a particular section by index in the section table; any other string identifies all sections with that name in the object file. The contents of the section will be relocated before they are displayed.

\fB-p <number or name>\fR 4

\fB--string-dump=<number or name>\fR 4

Displays the contents of the indicated section as printable strings. A number identifies a particular section by index in the section table; any other string identifies all sections with that name in the object file.

\fB-c\fR 4

\fB--archive-index\fR 4

Displays the file symbol index information contained in the header part of binary archives. Performs the same function as the t command to ar, but without using the s-1BFDs0 library.

\fB-w[lLiaprmfFsoRt]\fR 4

\fB--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index]\fR 4

Displays the contents of the debug sections in the file, if any are present. If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped.

Note that there is no single letter option to display the content of trace sections or .gdb_index.

Note: the =decodedline option will display the interpreted contents of a .debug_line section whereas the =rawline option dumps the contents in a raw format.

Note: the =frames-interp option will display the interpreted contents of a .debug_frame section whereas the =frames option dumps the contents in a raw format.

Note: the output from the =info option can also be affected by the options --dwarf-depth and --dwarf-start.

\fB--dwarf-depth=\fR\fIn\fR 4

Limit the dump of the f(CW*(C`.debug_info*(C' section to n children. This is only useful with --debug-dump=info. The default is to print all DIEs; the special value 0 for n will also have this effect.

With a non-zero value for n, DIEs at or deeper than n levels will not be printed. The range for n is zero-based.

\fB--dwarf-start=\fR\fIn\fR 4

Print only DIEs beginning with the s-1DIEs0 numbered n. This is only useful with --debug-dump=info.

If specified, this option will suppress printing of any header information and all DIEs before the s-1DIEs0 numbered n. Only siblings and children of the specified s-1DIEs0 will be printed.

This can be used in conjunction with --dwarf-depth.

\fB-I\fR 4

\fB--histogram\fR 4

Display a histogram of bucket list lengths when displaying the contents of the symbol tables.

\fB-v\fR 4

\fB--version\fR 4

Display the version number of readelf.

\fB-W\fR 4

\fB--wide\fR 4

Don't break output lines to fit into 80 columns. By default readelf breaks section header and segment listing lines for 64-bit s-1ELFs0 files, so that they fit into 80 columns. This option causes readelf to print each section header resp. each segment one a single line, which is far more readable on terminals wider than 80 columns.

\fB-H\fR 4

\fB--help\fR 4

Display the command line options understood by readelf.

\fB@\fR\fIfile\fR 4

Read command-line options from file. The options read are inserted in place of the original @file option. If file does not exist, or cannot be read, then the option will be treated literally, and not removed.

Options in file are separated by whitespace. A whitespace character may be included in an option by surrounding the entire option in either single or double quotes. Any character (including a backslash) may be included by prefixing the character to be included with a backslash. The file may itself contain additional @file options; any such options will be processed recursively.

## SEE ALSO

objdump|(1), and the Info entries for binutils.

## COPYRIGHT

Copyright (c) 1991-2014 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document under the terms of the s-1GNUs0 Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled *(L"s-1GNUs0 Free Documentation License*(R".