aboutsummaryrefslogtreecommitdiff
path: root/gold/symtab.cc
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@gmail.com>2018-08-06 14:08:48 -0700
committerCary Coutant <ccoutant@gmail.com>2018-08-06 14:10:13 -0700
commit3a12c78d1491c4877928e7294c8cdbe8171dfeed (patch)
tree654fb291f2f56d9b35021239b1192a42d7cadb2a /gold/symtab.cc
parenta7f25a84f4cc1df5248c46346337f19a2a66af5a (diff)
downloadgdb-3a12c78d1491c4877928e7294c8cdbe8171dfeed.zip
gdb-3a12c78d1491c4877928e7294c8cdbe8171dfeed.tar.gz
gdb-3a12c78d1491c4877928e7294c8cdbe8171dfeed.tar.bz2
Add --warn-drop-version option; by default, do not warn when discarding version info.
gold/ PR gold/23455 * options.h (General_options): Add --warn-drop-version option. * symtab.cc (Symbol_table::set_dynsym_indexes): Check it.
Diffstat (limited to 'gold/symtab.cc')
-rw-r--r--gold/symtab.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/gold/symtab.cc b/gold/symtab.cc
index aa76441..759e0d0 100644
--- a/gold/symtab.cc
+++ b/gold/symtab.cc
@@ -2623,11 +2623,12 @@ Symbol_table::set_dynsym_indexes(unsigned int index,
versions->record_version(this, dynpool, sym);
else
{
- gold_warning(_("discarding version information for "
- "%s@%s, defined in unused shared library %s "
- "(linked with --as-needed)"),
- sym->name(), sym->version(),
- sym->object()->name().c_str());
+ if (parameters->options().warn_drop_version())
+ gold_warning(_("discarding version information for "
+ "%s@%s, defined in unused shared library %s "
+ "(linked with --as-needed)"),
+ sym->name(), sym->version(),
+ sym->object()->name().c_str());
sym->clear_version();
}
}