[\fB\-S\fR|\fB\-\-section\-headers\fR|\fB\-\-sections\fR]
[\fB\-g\fR|\fB\-\-section\-groups\fR]
[\fB\-e\fR|\fB\-\-exception\fR]
- [\fB\-s\fR|\fB\-\-symbols\fR]
+ [\fB\-s\fR|\fB\-\-symbols\fR] [section name] ]
+ [\fB\-\-dyn-syms\fR]
[\fB\-n\fR|\fB\-\-notes\fR [section name] ]
[\fB\-r\fR|\fB\-\-relocs\fR]
[\fB\-d\fR|\fB\-\-dynamic\fR]
.IP "\fB\-s\fR" 4
.IX Item "-s"
.PD 0
-.IP "\fB\-\-symbols\fR" 4
+.IP "\fB\-\-symbols\fR [section name]" 4
.IX Item "--symbols"
.PD
Displays the entries in symbol table section of the file, if it has one.
when resolving unversioned references to the symbol then it is
displayed as a suffix preceeded by two @ characters. For example
\&\fBfoo@@VER_2\fR.
+.IP "\fB\-\-dyn-syms\fR" 4
+.IX Item "--dyn-syms"
+.PD
+Display (only) the dynamic symbol table.
.IP "\fB\-e\fR" 4
.IX Item "-e"
.PD 0
/* argp key value for --dwarf-skeleton, non-ascii. */
#define DWARF_SKELETON 257
+/* argp key value for --dyn-syms, non-ascii. */
+#define PRINT_DYNSYM_TABLE 258
+
/* Terrible hack for hooking unrelated skeleton/split compile units,
see __libdw_link_skel_split in print_debug. */
static bool do_not_close_dwfl = false;
{ "sections", 'S', NULL, OPTION_ALIAS | OPTION_HIDDEN, NULL, 0 },
{ "symbols", 's', "SECTION", OPTION_ARG_OPTIONAL,
N_("Display the symbol table sections"), 0 },
+ { "dyn-syms", PRINT_DYNSYM_TABLE, NULL, 0,
+ N_("Display (only) the dynamic symbol table"), 0 },
{ "version-info", 'V', NULL, 0, N_("Display versioning information"), 0 },
{ "notes", 'n', "SECTION", OPTION_ARG_OPTIONAL, N_("Display the ELF notes"), 0 },
{ "arch-specific", 'A', NULL, 0,
/* True if the symbol table should be printed. */
static bool print_symbol_table;
+/* True if (only) the dynsym table should be printed. */
+static bool print_dynsym_table;
+
/* A specific section name, or NULL to print all symbol tables. */
static char *symbol_table_section;
any_control_option = true;
symbol_table_section = arg;
break;
+ case PRINT_DYNSYM_TABLE:
+ print_dynsym_table = true;
+ any_control_option = true;
+ break;
case 'V':
print_version_info = true;
any_control_option = true;
print_relocs (pure_ebl, ehdr);
if (print_histogram)
handle_hash (ebl);
- if (print_symbol_table)
+ if (print_symbol_table || print_dynsym_table)
print_symtab (ebl, SHT_DYNSYM);
if (print_version_info)
print_verinfo (ebl);