binutils: readelf
1
1 15 readelf
1 **********
1
1 readelf [-a|--all]
1 [-h|--file-header]
1 [-l|--program-headers|--segments]
1 [-S|--section-headers|--sections]
1 [-g|--section-groups]
1 [-t|--section-details]
1 [-e|--headers]
1 [-s|--syms|--symbols]
1 [--dyn-syms]
1 [-n|--notes]
1 [-r|--relocs]
1 [-u|--unwind]
1 [-d|--dynamic]
1 [-V|--version-info]
1 [-A|--arch-specific]
1 [-D|--use-dynamic]
1 [-x <number or name>|--hex-dump=<number or name>]
1 [-p <number or name>|--string-dump=<number or name>]
1 [-R <number or name>|--relocated-dump=<number or name>]
1 [-z|--decompress]
1 [-c|--archive-index]
1 [-w[lLiaprmfFsoRtUuTgAckK]|
1 --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
1 [--dwarf-depth=N]
1 [--dwarf-start=N]
1 [-I|--histogram]
1 [-v|--version]
1 [-W|--wide]
1 [-H|--help]
1 [-U METHOD|--unicode=METHOD]
1 ELFFILE...
1
1 'readelf' displays information about one or more ELF format object
1 files. The options control what particular information to display.
1
1 ELFFILE... are the object files to be examined. 32-bit and 64-bit
1 ELF files are supported, as are archives containing ELF files.
1
1 This program performs a similar function to 'objdump' but it goes
1 into more detail and it exists independently of the BFD library, so if
1 there is a bug in BFD then readelf will not be affected.
1
1 The long and short forms of options, shown here as alternatives, are
1 equivalent. At least one option besides '-v' or '-H' must be given.
1
1 '-a'
1 '--all'
1 Equivalent to specifying '--file-header', '--program-headers',
1 '--sections', '--symbols', '--relocs', '--dynamic', '--notes',
1 '--version-info', '--arch-specific', '--unwind', '--section-groups'
1 and '--histogram'.
1
1 Note - this option does not enable '--use-dynamic' itself, so if
1 that option is not present on the command line then dynamic symbols
1 and dynamic relocs will not be displayed.
1
1 '-h'
1 '--file-header'
1 Displays the information contained in the ELF header at the start
1 of the file.
1
1 '-l'
1 '--program-headers'
1 '--segments'
1 Displays the information contained in the file's segment headers,
1 if it has any.
1
1 '-S'
1 '--sections'
1 '--section-headers'
1 Displays the information contained in the file's section headers,
1 if it has any.
1
1 '-g'
1 '--section-groups'
1 Displays the information contained in the file's section groups, if
1 it has any.
1
1 '-t'
1 '--section-details'
1 Displays the detailed section information. Implies '-S'.
1
1 '-s'
1 '--symbols'
1 '--syms'
1 Displays the entries in symbol table section of the file, if it has
1 one. If a symbol has version information associated with it then
1 this is displayed as well. The version string is displayed as a
1 suffix to the symbol name, preceeded by an @ character. For
1 example 'foo@VER_1'. If the version is the default version to be
1 used when resolving unversioned references to the symbol then it is
1 displayed as a suffix preceeded by two @ characters. For example
1 'foo@@VER_2'.
1
1 '--dyn-syms'
1 Displays the entries in dynamic symbol table section of the file,
1 if it has one. The output format is the same as the format used by
1 the '--syms' option.
1
1 '-U [D|I|L|E|X|H]'
1 '--unicode=[default|invalid|locale|escape|hex|highlight]'
1 Controls the display of non-ASCII characters in identifier names.
1 The default ('--unicode=locale' or '--unicode=default') is to treat
1 them as multibyte characters and display them in the current
1 locale. All other versions of this option treat the bytes as UTF-8
1 encoded values and attempt to interpret them. If they cannot be
1 interpreted or if the '--unicode=invalid' option is used then they
1 are displayed as a sequence of hex bytes, encloses in curly
1 parethesis characters.
1
1 Using the '--unicode=escape' option will display the characters as
1 as unicode escape sequences (\UXXXX). Using the '--unicode=hex'
1 will display the characters as hex byte sequences enclosed between
1 angle brackets.
1
1 Using the '--unicode=highlight' will display the characters as
1 unicode escape sequences but it will also highlighted them in red,
1 assuming that colouring is supported by the output device. The
1 colouring is intended to draw attention to the presence of unicode
1 sequences when they might not be expected.
1
1 '-e'
1 '--headers'
1 Display all the headers in the file. Equivalent to '-h -l -S'.
1
1 '-n'
1 '--notes'
1 Displays the contents of the NOTE segments and/or sections, if any.
1
1 '-r'
1 '--relocs'
1 Displays the contents of the file's relocation section, if it has
1 one.
1
1 '-u'
1 '--unwind'
1 Displays the contents of the file's unwind section, if it has one.
1 Only the unwind sections for IA64 ELF files, as well as ARM unwind
1 tables ('.ARM.exidx' / '.ARM.extab') are currently supported.
1
1 '-d'
1 '--dynamic'
1 Displays the contents of the file's dynamic section, if it has one.
1
1 '-V'
1 '--version-info'
1 Displays the contents of the version sections in the file, it they
1 exist.
1
1 '-A'
1 '--arch-specific'
1 Displays architecture-specific information in the file, if there is
1 any.
1
1 '-D'
1 '--use-dynamic'
1 When displaying symbols, this option makes 'readelf' use the symbol
1 hash tables in the file's dynamic section, rather than the symbol
1 table sections.
1
1 When displaying relocations, this option makes 'readelf' display
1 the dynamic relocations rather than the static relocations.
1
1 '-x <number or name>'
1 '--hex-dump=<number or name>'
1 Displays the contents of the indicated section as a hexadecimal
1 bytes. A number identifies a particular section by index in the
1 section table; any other string identifies all sections with that
1 name in the object file.
1
1 '-R <number or name>'
1 '--relocated-dump=<number or name>'
1 Displays the contents of the indicated section as a hexadecimal
1 bytes. A number identifies a particular section by index in the
1 section table; any other string identifies all sections with that
1 name in the object file. The contents of the section will be
1 relocated before they are displayed.
1
1 '-p <number or name>'
1 '--string-dump=<number or name>'
1 Displays the contents of the indicated section as printable
1 strings. A number identifies a particular section by index in the
1 section table; any other string identifies all sections with that
1 name in the object file.
1
1 '-z'
1 '--decompress'
1 Requests that the section(s) being dumped by 'x', 'R' or 'p'
1 options are decompressed before being displayed. If the section(s)
1 are not compressed then they are displayed as is.
1
1 '-c'
1 '--archive-index'
1 Displays the file symbol index information contained in the header
1 part of binary archives. Performs the same function as the 't'
1 command to 'ar', but without using the BFD library. ⇒ar.
1
1 '-w[lLiaprmfFsoRtUuTgAckK]'
1 '--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]'
1
1 Displays the contents of the DWARF debug sections in the file, if
1 any are present. Compressed debug sections are automatically
1 decompressed (temporarily) before they are displayed. If one or
1 more of the optional letters or words follows the switch then only
1 those type(s) of data will be dumped. The letters and words refer
1 to the following information:
1
1 'a'
1 '=abbrev'
1 Displays the contents of the '.debug_abbrev' section.
1
1 'A'
1 '=addr'
1 Displays the contents of the '.debug_addr' section.
1
1 'c'
1 '=cu_index'
1 Displays the contents of the '.debug_cu_index' and/or
1 '.debug_tu_index' sections.
1
1 'f'
1 '=frames'
1 Display the raw contents of a '.debug_frame' section.
1
1 'F'
1 '=frame-interp'
1 Display the interpreted contents of a '.debug_frame' section.
1
1 'g'
1 '=gdb_index'
1 Displays the contents of the '.gdb_index' and/or
1 '.debug_names' sections.
1
1 'i'
1 '=info'
1 Displays the contents of the '.debug_info' section. Note: the
1 output from this option can also be restricted by the use of
1 the '--dwarf-depth' and '--dwarf-start' options.
1
1 'k'
1 '=links'
1 Displays the contents of the '.gnu_debuglink' and/or
1 '.gnu_debugaltlink' sections. Also displays the link to a
1 separate dwarf object file (dwo), if one is specified by the
1 DW_AT_GNU_dwo_name or DW_AT_dwo_name attributes in the
1 '.debug_info' section.
1
1 'K'
1 '=follow-links'
1 Display the contents of any selected debug sections that are
1 found in a linked, separate debug info file. This can result
1 in multiple versions of the same debug section being displayed
1 if both the main file and the separate debug info file contain
1 sections with the same name.
1
1 In addition, when displaying DWARF attributes, if a form is
1 found that references the separate debug info file, then the
1 referenced contents will also be displayed.
1
1 'l'
1 '=rawline'
1 Displays the contents of the '.debug_line' section in a raw
1 format.
1
1 'L'
1 '=decodedline'
1 Displays the interpreted contents of the '.debug_line'
1 section.
1
1 'm'
1 '=macro'
1 Displays the contents of the '.debug_macro' and/or
1 '.debug_macinfo' sections.
1
1 'o'
1 '=loc'
1 Displays the contents of the '.debug_loc' and/or
1 '.debug_loclists' sections.
1
1 'p'
1 '=pubnames'
1 Displays the contents of the '.debug_pubnames' and/or
1 '.debug_gnu_pubnames' sections.
1
1 'r'
1 '=aranges'
1 Displays the contents of the '.debug_aranges' section.
1
1 'R'
1 '=Ranges'
1 Displays the contents of the '.debug_ranges' and/or
1 '.debug_rnglists' sections.
1
1 's'
1 '=str'
1 Displays the contents of the '.debug_str', '.debug_line_str'
1 and/or '.debug_str_offsets' sections.
1
1 't'
1 '=pubtype'
1 Displays the contents of the '.debug_pubtypes' and/or
1 '.debug_gnu_pubtypes' sections.
1
1 'T'
1 '=trace_aranges'
1 Displays the contents of the '.trace_aranges' section.
1
1 'u'
1 '=trace_abbrev'
1 Displays the contents of the '.trace_abbrev' section.
1
1 'U'
1 '=trace_info'
1 Displays the contents of the '.trace_info' section.
1
1 Note: displaying the contents of '.debug_static_funcs',
1 '.debug_static_vars' and 'debug_weaknames' sections is not
1 currently supported.
1
1 '--dwarf-depth=N'
1 Limit the dump of the '.debug_info' section to N children. This is
1 only useful with '--debug-dump=info'. The default is to print all
1 DIEs; the special value 0 for N will also have this effect.
1
1 With a non-zero value for N, DIEs at or deeper than N levels will
1 not be printed. The range for N is zero-based.
1
1 '--dwarf-start=N'
1 Print only DIEs beginning with the DIE numbered N. This is only
1 useful with '--debug-dump=info'.
1
1 If specified, this option will suppress printing of any header
1 information and all DIEs before the DIE numbered N. Only siblings
1 and children of the specified DIE will be printed.
1
1 This can be used in conjunction with '--dwarf-depth'.
1
1 '-I'
1 '--histogram'
1 Display a histogram of bucket list lengths when displaying the
1 contents of the symbol tables.
1
1 '-v'
1 '--version'
1 Display the version number of readelf.
1
1 '-W'
1 '--wide'
1 Don't break output lines to fit into 80 columns. By default
1 'readelf' breaks section header and segment listing lines for
1 64-bit ELF files, so that they fit into 80 columns. This option
1 causes 'readelf' to print each section header resp. each segment
1 one a single line, which is far more readable on terminals wider
1 than 80 columns.
1
1 '-H'
1 '--help'
1 Display the command line options understood by 'readelf'.
1