elfdump.1 (2010 09)

e
elfdump(1) elfdump(1)
(ELF Applications Only)
-n name (Modifier) Dumps information about the specified section or symbol name. This option is
valid with
-h, -r, -s
, and -t. If used with -t, name pertains to a symbol name and
elfdump will only dump the symbol entry whose name matches name. If used with the
other options, name pertains to a section name and
elfdump will only dump the section
whose name matches it.
-o Dumps the optional headers (program headers).
-p (Modifier) Do not print titles, with all options.
-q (Modifier) Suppresses printing CTTI section headers. Valid with
-k option.
-r Dumps the relocations.
-s Dumps the section contents.
+objdebug Dumps any section beginning with .objdebug_
as a string table.
+s name (Modifier) Dumps the section specified by name. Valid with
-c and -t only.
-S (Modifier) Dumps output information in short format. Valid with the
-h and -o options.
-t Dumps the symbol table entries.
-tx (Itanium-based systems) Dumps the value of
st_shndx in symbol table, in addition to
information dump from
-t option. This option is useful to verify the data stored in the
symbol table.
-T num Prints the symbol whose index is num.
+T num2 (Modifier) Prints the symbols in the range 0 to num2. If used with
-T, print the symbols
in the range num to num2. Valid with
-t.
-tv Prints versioned symbols.
-u Prints the usage menu.
-U Prints the unwind table.
-v (Modifier) Verifies the CTTI section headers before printing. Valid with the
-k option.
-V Prints the version number for elfdump.
EXAMPLES
To see the functions exported from a shared library:
$ elfdump -s -n .dynsym libsubs.so | grep ’FUNC GLOB’ | grep -v UNDEF
To see the global data items exported from a shared library:
$
elfdump -s -n .dynsym libsubs.so | grep ’OBJT GLOB’ | grep -v UNDEF
To display string table information (.strtab):
$
elfdump -c subs.o
To list the shared libraries linked with a program or shared library (dependent libraries):
$
elfdump -L a.out | grep Needed
$ chatr a.out # shared library list
To list the embedded path for shared libraries opened by a program:
$
elfdump -L a.out | grep Rpath #or
$ elfdump -s -n .dynamic a.out | grep Rpath
$ chatr a.out # embedded path
SEE ALSO
System Tools
ld(1) Invoke the link editor
Miscellaneous
a.out (4) Assembler, compiler, and linker output
elf(3E) Executable and Linking Format
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010