aboutsummaryrefslogtreecommitdiff
path: root/binutils/nm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-10-08 14:54:04 +0000
committerNick Clifton <nickc@redhat.com>2004-10-08 14:54:04 +0000
commit3c9458e9534287bda2ab643e6c39b0008595a493 (patch)
tree0698a23a10b1400abd7941a58f30901382dbeb49 /binutils/nm.c
parentd2b2c203e1ff2daf8cfeab0906084f9389e66246 (diff)
downloadgdb-3c9458e9534287bda2ab643e6c39b0008595a493.zip
gdb-3c9458e9534287bda2ab643e6c39b0008595a493.tar.gz
gdb-3c9458e9534287bda2ab643e6c39b0008595a493.tar.bz2
Implement a new BFD API function: bfd_is_target_special_symbol. Use this in nm
and objdump to skip the displaying of ARM Mapping symbols unless specifically requested.
Diffstat (limited to 'binutils/nm.c')
-rw-r--r--binutils/nm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/binutils/nm.c b/binutils/nm.c
index be89cec..c35f7c8 100644
--- a/binutils/nm.c
+++ b/binutils/nm.c
@@ -152,6 +152,7 @@ static int show_version = 0; /* Show the version number. */
static int show_stats = 0; /* Show statistics. */
static int show_synthetic = 0; /* Display synthesized symbols too. */
static int line_numbers = 0; /* Print line numbers for symbols. */
+static int allow_special_symbols = 0; /* Allow special symbols. */
/* When to print the names of files. Not mutually exclusive in SYSV format. */
static int filename_per_file = 0; /* Once per file, on its own line. */
@@ -205,6 +206,7 @@ static struct option long_options[] =
{"radix", required_argument, 0, 't'},
{"reverse-sort", no_argument, &reverse_sort, 1},
{"size-sort", no_argument, &sort_by_size, 1},
+ {"special-syms", no_argument, &allow_special_symbols, 1},
{"stats", no_argument, &show_stats, 1},
{"synthetic", no_argument, &show_synthetic, 1},
{"target", required_argument, 0, OPTION_TARGET},
@@ -246,6 +248,7 @@ usage (FILE *stream, int status)
-S, --print-size Print size of defined symbols\n\
-s, --print-armap Include index for symbols from archive members\n\
--size-sort Sort symbols by size\n\
+ --skip-special Ignore special symbols\n\
--synthetic Display synthetic symbols as well\n\
-t, --radix=RADIX Use RADIX for printing symbol values\n\
--target=BFDNAME Specify the target object format as BFDNAME\n\
@@ -446,6 +449,11 @@ filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
keep = 0;
}
+ if (keep
+ && bfd_is_target_special_symbol (abfd, sym)
+ && ! allow_special_symbols)
+ keep = 0;
+
if (keep)
{
memcpy (to, from, size);