12c23cb7cSEd Maste.\" Copyright (c) 2009,2011 Joseph Koshy <jkoshy@users.sourceforge.net> 22c23cb7cSEd Maste.\" All rights reserved. 32c23cb7cSEd Maste.\" 42c23cb7cSEd Maste.\" Redistribution and use in source and binary forms, with or without 52c23cb7cSEd Maste.\" modification, are permitted provided that the following conditions 62c23cb7cSEd Maste.\" are met: 72c23cb7cSEd Maste.\" 1. Redistributions of source code must retain the above copyright 82c23cb7cSEd Maste.\" notice, this list of conditions and the following disclaimer 92c23cb7cSEd Maste.\" in this position and unchanged. 102c23cb7cSEd Maste.\" 2. Redistributions in binary form must reproduce the above copyright 112c23cb7cSEd Maste.\" notice, this list of conditions and the following disclaimer in the 122c23cb7cSEd Maste.\" documentation and/or other materials provided with the distribution. 132c23cb7cSEd Maste.\" 142c23cb7cSEd Maste.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR 152c23cb7cSEd Maste.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 162c23cb7cSEd Maste.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 172c23cb7cSEd Maste.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 182c23cb7cSEd Maste.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 192c23cb7cSEd Maste.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 202c23cb7cSEd Maste.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 212c23cb7cSEd Maste.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 222c23cb7cSEd Maste.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 232c23cb7cSEd Maste.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 242c23cb7cSEd Maste.\" 25ae500c1fSEd Maste.\" $Id: readelf.1 3642 2018-10-14 14:24:28Z jkoshy $ 262c23cb7cSEd Maste.\" 27*718699beSMark Johnston.Dd May 30, 2019 282c23cb7cSEd Maste.Dt READELF 1 29ae500c1fSEd Maste.Os 302c23cb7cSEd Maste.Sh NAME 312c23cb7cSEd Maste.Nm readelf 322c23cb7cSEd Maste.Nd display information about ELF objects 332c23cb7cSEd Maste.Sh SYNOPSIS 342c23cb7cSEd Maste.Nm 352c23cb7cSEd Maste.Op Fl a | Fl -all 362c23cb7cSEd Maste.Op Fl c | Fl -archive-index 372c23cb7cSEd Maste.Op Fl d | Fl -dynamic 382c23cb7cSEd Maste.Op Fl e | Fl -headers 392c23cb7cSEd Maste.Op Fl g | Fl -section-groups 402c23cb7cSEd Maste.Op Fl h | Fl -file-header 412c23cb7cSEd Maste.Op Fl l | Fl -program-headers 422c23cb7cSEd Maste.Op Fl n | Fl -notes 432c23cb7cSEd Maste.Op Fl p Ar section | Fl -string-dump Ns = Ns Ar section 442c23cb7cSEd Maste.Op Fl r | Fl -relocs 452c23cb7cSEd Maste.Op Fl t | Fl -section-details 462c23cb7cSEd Maste.Op Fl v | Fl -version 472c23cb7cSEd Maste.Oo 482c23cb7cSEd Maste.Fl w Ns Oo Ns Ar afilmoprsFLR Ns Oc | 492c23cb7cSEd Maste.Fl -debug-dump Ns Op Ns = Ns Ar long-option-name , Ns ... 502c23cb7cSEd Maste.Oc 51b6d812d2SEd Maste.Op Fl x Ar section | Fl -hex-dump Ns = Ns Ar section 522c23cb7cSEd Maste.Op Fl A | Fl -arch-specific 532c23cb7cSEd Maste.Op Fl D | Fl -use-dynamic 542c23cb7cSEd Maste.Op Fl H | Fl -help 552c23cb7cSEd Maste.Op Fl I | Fl -histogram 562c23cb7cSEd Maste.Op Fl N | -full-section-name 572c23cb7cSEd Maste.Op Fl S | Fl -sections | Fl -section-headers 582c23cb7cSEd Maste.Op Fl V | Fl -version-info 592c23cb7cSEd Maste.Op Fl W | Fl -wide 602c23cb7cSEd Maste.Ar file... 612c23cb7cSEd Maste.Sh DESCRIPTION 622c23cb7cSEd MasteThe 632c23cb7cSEd Maste.Nm 642c23cb7cSEd Masteutility displays information about ELF objects and 652c23cb7cSEd Maste.Xr ar 1 662c23cb7cSEd Mastearchives. 672c23cb7cSEd Maste.Pp 682c23cb7cSEd MasteThe 692c23cb7cSEd Maste.Nm 702c23cb7cSEd Masteutility recognizes the following options: 712c23cb7cSEd Maste.Bl -tag -width indent 722c23cb7cSEd Maste.It Fl a | Fl -all 732c23cb7cSEd MasteTurn on the following flags: 742c23cb7cSEd Maste.Fl d , 752c23cb7cSEd Maste.Fl h , 762c23cb7cSEd Maste.Fl I , 772c23cb7cSEd Maste.Fl l , 782c23cb7cSEd Maste.Fl r , 792c23cb7cSEd Maste.Fl s , 802c23cb7cSEd Maste.Fl A , 812c23cb7cSEd Maste.Fl S 822c23cb7cSEd Masteand 832c23cb7cSEd Maste.Fl V . 842c23cb7cSEd Maste.It Fl c | Fl -archive-index 852c23cb7cSEd MastePrint the archive symbol table for archives. 862c23cb7cSEd Maste.It Fl d | Fl -dynamic 872c23cb7cSEd MastePrint the contents of the 882c23cb7cSEd Maste.Li SHT_DYNAMIC 892c23cb7cSEd Mastesections in the ELF object. 902c23cb7cSEd Maste.It Fl e | Fl -headers 912c23cb7cSEd MastePrint all program, file and section headers in the ELF object. 922c23cb7cSEd Maste.It Fl g | Fl -section-groups 933ef90571SEd MastePrint the contents of the section groups in the ELF object. 942c23cb7cSEd Maste.It Fl h | Fl -file-header 952c23cb7cSEd MastePrint the file header of the ELF object. 962c23cb7cSEd Maste.It Fl l | Fl -program-headers 972c23cb7cSEd MastePrint the content of the program header table for the object. 982c23cb7cSEd Maste.It Fl n | Fl -notes 992c23cb7cSEd MastePrint the contents of 1002c23cb7cSEd Maste.Li PT_NOTE 1012c23cb7cSEd Mastesegments or 1022c23cb7cSEd Maste.Li SHT_NOTE 1032c23cb7cSEd Mastesections present in the ELF object. 1042c23cb7cSEd Maste.It Fl p Ar section | Fl -string-dump Ns = Ns Ar section 1052c23cb7cSEd MastePrint the contents of the specified section as printable strings. 1062c23cb7cSEd MasteThe argument 1072c23cb7cSEd Maste.Ar section 1082c23cb7cSEd Masteshould be the name of a section or a numeric section index. 1092c23cb7cSEd Maste.It Fl r | Fl -relocs 1102c23cb7cSEd MastePrint relocation information. 1112c23cb7cSEd Maste.It Fl s | Fl -syms | Fl -symbols 1122c23cb7cSEd MastePrint symbol tables. 1132c23cb7cSEd Maste.It Fl t | Fl -section-details 1142c23cb7cSEd MastePrint additional information about sections, such as the flags 1152c23cb7cSEd Mastefields in section headers. 116*718699beSMark JohnstonImplies 117*718699beSMark Johnston.Fl S . 1182c23cb7cSEd Maste.It Fl v | Fl -version 1192c23cb7cSEd MastePrints a version identifier for 1202c23cb7cSEd Maste.Nm 1212c23cb7cSEd Masteand exits. 1222c23cb7cSEd Maste.It Fl w Ns Oo afilmoprsFLR Oc | Xo 1232c23cb7cSEd Maste.Fl -debug-dump Ns Op Ns = Ns Ar long-option-name , Ns ... 1242c23cb7cSEd Maste.Xc 1252c23cb7cSEd MasteDisplay DWARF information. 1262c23cb7cSEd MasteThe 1272c23cb7cSEd Maste.Fl w 1282c23cb7cSEd Masteoption is used with the short options in the following 1292c23cb7cSEd Mastetable; the 1302c23cb7cSEd Maste.Fl -debug-dump 1312c23cb7cSEd Masteoption is used with a comma-separated list of the corresponding long 1322c23cb7cSEd Masteoption names: 1332c23cb7cSEd Maste.Bl -column ".Em Short Option" "aranges|ranges" 1342c23cb7cSEd Maste.It Em Short Option Ta Em Long Option Ta Em Description 1352c23cb7cSEd Maste.It a Ta abbrev Ta Show abbreviation information. 1362c23cb7cSEd Maste.It f Ta frames Ta Show frame information, displaying frame instructions. 1372c23cb7cSEd Maste.It i Ta info Ta Show debugging information entries. 1382c23cb7cSEd Maste.It l Ta rawline Ta Show line information in raw form. 1392c23cb7cSEd Maste.It m Ta macro Ta Show macro information. 1402c23cb7cSEd Maste.It o Ta loc Ta Show location list information. 1412c23cb7cSEd Maste.It p Ta pubnames Ta Show global names. 1422c23cb7cSEd Maste.It r Ta aranges|ranges Ta Show address range information. 1432c23cb7cSEd Maste.It s Ta str Ta Show the debug string table. 144cf781b2eSEd Maste.It F Ta frames-interp Ta Show frame information, displaying register rules. 1452c23cb7cSEd Maste.It L Ta decodedline Ta Show line information in decoded form. 1462c23cb7cSEd Maste.It R Ta Ranges Ta Show range lists. 1472c23cb7cSEd Maste.El 1482c23cb7cSEd Maste.Pp 1492c23cb7cSEd MasteIf no sub-options are specified, the default is to show information 1502c23cb7cSEd Mastecorresponding to the 1512c23cb7cSEd Maste.Ar a , f , i, l , o , p , r , s 1522c23cb7cSEd Masteand 1532c23cb7cSEd Maste.Ar R 1542c23cb7cSEd Masteshort options. 1552c23cb7cSEd Maste.It Fl x Ar section | Fl -hex-dump Ns = Ns Ar section 1562c23cb7cSEd MasteDisplay the contents of the specified section in hexadecimal. 1572c23cb7cSEd MasteThe argument 1582c23cb7cSEd Maste.Ar section 1592c23cb7cSEd Masteshould be the name of a section or a numeric section index. 1602c23cb7cSEd Maste.It Fl A | Fl -arch-specific 1612c23cb7cSEd MasteThis option is accepted but is currently unimplemented. 1622c23cb7cSEd Maste.It Fl D | Fl -use-dynamic 1632c23cb7cSEd MastePrint the symbol table specified by the 1642c23cb7cSEd Maste.Li DT_SYMTAB 1652c23cb7cSEd Masteentry in the 1662c23cb7cSEd Maste.Dq Li .dynamic 1672c23cb7cSEd Mastesection. 1682c23cb7cSEd Maste.It Fl H | Fl -help 1692c23cb7cSEd MastePrint a help message. 1702c23cb7cSEd Maste.It Fl I | Fl -histogram 1712c23cb7cSEd MastePrint information on bucket list lengths for sections of type 1722c23cb7cSEd Maste.Li SHT_HASH 1732c23cb7cSEd Masteand 1742c23cb7cSEd Maste.Li SHT_GNU_HASH . 1752c23cb7cSEd Maste.It Fl N | Fl -full-section-name 1762c23cb7cSEd MasteThis option is accepted but is currently unimplemented. 1772c23cb7cSEd Maste.It Fl S | Fl -sections | Fl -section-headers 1782c23cb7cSEd MastePrint information in the section headers for each ELF object. 1792c23cb7cSEd Maste.It Fl V | Fl -version-info 1802c23cb7cSEd MastePrint symbol versioning information. 1812c23cb7cSEd Maste.It Fl W | Fl -wide 1822c23cb7cSEd MastePrint information about ELF structures using one long line per 1832c23cb7cSEd Mastestructure. 1842c23cb7cSEd MasteIf this option is not specified, 1852c23cb7cSEd Maste.Nm 1862c23cb7cSEd Mastewill list information in the headers of 64 bit ELF objects on two 1872c23cb7cSEd Masteseparate lines. 1882c23cb7cSEd Maste.El 1892c23cb7cSEd Maste.Sh EXIT STATUS 1902c23cb7cSEd Maste.Ex -std 1912c23cb7cSEd Maste.Sh SEE ALSO 1922c23cb7cSEd Maste.Xr nm 1 , 1932c23cb7cSEd Maste.Xr addr2line 1 , 1942c23cb7cSEd Maste.Xr elfcopy 1 , 1952c23cb7cSEd Maste.Sh AUTHORS 1962c23cb7cSEd MasteThe 1972c23cb7cSEd Maste.Nm 1982c23cb7cSEd Masteutility was written by 199b00fe64fSEd Maste.An Kai Wang Aq Mt kaiwang27@users.sourceforge.net . 200