summaryrefslogtreecommitdiffstats
path: root/src/readelf.c
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2009-07-01 20:07:16 -0700
committerRoland McGrath <[email protected]>2009-07-01 20:07:16 -0700
commit0471302062052d6dfde90a50302d932e0da21103 (patch)
treea5ac630507147e246d95cd1200ddd610f76741bd /src/readelf.c
parent50d5e2c1d84f709d279973961f75c33848403b79 (diff)
parent0dd9f27d6c68a147de29ade2eade4b4c29fe7bc3 (diff)
Merge branch 'dwarf' into roland/trackerupstream/roland/tracker
Diffstat (limited to 'src/readelf.c')
-rw-r--r--src/readelf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c
index 8564c6ad..e925565b 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -101,6 +101,8 @@ static const struct argp_option options[] =
0 },
{ NULL, 0, NULL, 0, N_("Output control:"), 0 },
+ { "numeric-addresses", 'N', NULL, 0,
+ N_("Do not find symbol names for addresses in DWARF data"), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -166,6 +168,9 @@ static bool print_archive_index;
/* True if any of the control options except print_archive_index is set. */
static bool any_control_option;
+/* True if we should print addresses from DWARF in symbolic form. */
+static bool print_address_names = true;
+
/* Select printing of debugging sections. */
static enum section_e
{
@@ -407,6 +412,9 @@ parse_opt (int key, char *arg,
add_dump_section (arg);
any_control_option = true;
break;
+ case 'N':
+ print_address_names = false;
+ break;
case ARGP_KEY_NO_ARGS:
fputs (gettext ("Missing file name.\n"), stderr);
goto do_argp_help;
@@ -3062,7 +3070,8 @@ format_dwarf_addr (Dwfl_Module *dwflmod,
{
/* See if there is a name we can give for this address. */
GElf_Sym sym;
- const char *name = dwfl_module_addrsym (dwflmod, address, &sym, NULL);
+ const char *name = print_address_names
+ ? dwfl_module_addrsym (dwflmod, address, &sym, NULL) : NULL;
if (name != NULL)
sym.st_value = address - sym.st_value;