The elfdump command displays information contained in ELF format object files, archives, and shared libraries. Use the following options to select the information you want to display:

To view

Use the option

Symbol table entries.

-t

Archive headers from an archive library.

-a

String table(s).

-c

File header.

-f

Global symbols from an archive.

-g

Section headers.

-h

The .dynamic section in shared libraries and dynamically linked program files.

-L

Optional headers (program headers).

-o

Relocations

-r

Section contents.

-s

Unwind table.

-U

Versioned symbols.

-tv

The elfdump command provides the following additional options to modify your selections:

Option

Modifies

Causes elfdump to

-H

all

Select output format in hexadecimal, octal, or decimal.

-p

all

Suppress title printing.

-S

-h,-o

Display headers in short format.

-C

-c, -r, -s, -t

Demangle C++ symbol names before displaying them.

 

 

With -H, ignored.

 

 

With -nname, display the symbol whose unmangled name matches

 

 

name, and prints its symbol name as a demangled name.

-D

num

-h,

-s

Display the section whose index is num.

+D

num2

-h,

-s

Display the sections in the range 1 to num2.

With -D, display the sections in the range num to num2.

-D num

-r

Display the relocation whose index is num.

+D num2

-r

Display only the relocations which apply to the section(s) in the range.

+s name

-c, -t

Display the section specified by name.

-n name

-h, -r, -s

Display information about the section specified by name.

-n name

-t

Display information about the symbol entry specified by name.

-T num

-t

Display the symbol whose index is num.

+T num2

-t

Display the symbols in the range 0 to num2.

 

 

With-T, display the symbols in the range num to num2.

Viewing the Contents of an Object File with elfdump(1)

73

Page 73
Image 73
HP UX Software Transition Kit (STK) manual To view