|
|
fde96c9 |
diff -rup binutils.orig/gold/options.h binutils-2.31.1/gold/options.h
|
|
|
fde96c9 |
--- binutils.orig/gold/options.h 2018-11-28 13:43:45.192094029 +0000
|
|
|
fde96c9 |
+++ binutils-2.31.1/gold/options.h 2018-11-28 13:44:30.616758345 +0000
|
|
|
fde96c9 |
@@ -1358,6 +1358,10 @@ class General_options
|
|
|
fde96c9 |
N_("Warn about duplicate common symbols"),
|
|
|
fde96c9 |
N_("Do not warn about duplicate common symbols"));
|
|
|
fde96c9 |
|
|
|
fde96c9 |
+ DEFINE_bool(warn_drop_version, options::TWO_DASHES, '\0', false,
|
|
|
fde96c9 |
+ N_("Warn when discarding version information"),
|
|
|
fde96c9 |
+ N_("Do not warn when discarding version information"));
|
|
|
fde96c9 |
+
|
|
|
fde96c9 |
DEFINE_bool_ignore(warn_constructors, options::TWO_DASHES, '\0',
|
|
|
fde96c9 |
N_("Ignored"), N_("Ignored"));
|
|
|
fde96c9 |
|
|
|
fde96c9 |
diff -rup binutils.orig/gold/symtab.cc binutils-2.31.1/gold/symtab.cc
|
|
|
fde96c9 |
--- binutils.orig/gold/symtab.cc 2018-11-28 13:43:45.193094021 +0000
|
|
|
fde96c9 |
+++ binutils-2.31.1/gold/symtab.cc 2018-11-28 13:45:13.479441595 +0000
|
|
|
fde96c9 |
@@ -2623,11 +2623,12 @@ Symbol_table::set_dynsym_indexes(unsigne
|
|
|
fde96c9 |
versions->record_version(this, dynpool, sym);
|
|
|
fde96c9 |
else
|
|
|
fde96c9 |
{
|
|
|
fde96c9 |
- gold_warning(_("discarding version information for "
|
|
|
fde96c9 |
- "%s@%s, defined in unused shared library %s "
|
|
|
fde96c9 |
- "(linked with --as-needed)"),
|
|
|
fde96c9 |
- sym->name(), sym->version(),
|
|
|
fde96c9 |
- sym->object()->name().c_str());
|
|
|
fde96c9 |
+ if (parameters->options().warn_drop_version())
|
|
|
fde96c9 |
+ gold_warning(_("discarding version information for "
|
|
|
fde96c9 |
+ "%s@%s, defined in unused shared library %s "
|
|
|
fde96c9 |
+ "(linked with --as-needed)"),
|
|
|
fde96c9 |
+ sym->name(), sym->version(),
|
|
|
fde96c9 |
+ sym->object()->name().c_str());
|
|
|
fde96c9 |
sym->clear_version();
|
|
|
fde96c9 |
}
|
|
|
fde96c9 |
}
|