2740684805
Resolves: #1654153
36 lines
1.6 KiB
Diff
36 lines
1.6 KiB
Diff
diff -rup binutils.orig/gold/options.h binutils-2.31.1/gold/options.h
|
|
--- binutils.orig/gold/options.h 2018-11-28 13:43:45.192094029 +0000
|
|
+++ binutils-2.31.1/gold/options.h 2018-11-28 13:44:30.616758345 +0000
|
|
@@ -1358,6 +1358,10 @@ class General_options
|
|
N_("Warn about duplicate common symbols"),
|
|
N_("Do not warn about duplicate common symbols"));
|
|
|
|
+ DEFINE_bool(warn_drop_version, options::TWO_DASHES, '\0', false,
|
|
+ N_("Warn when discarding version information"),
|
|
+ N_("Do not warn when discarding version information"));
|
|
+
|
|
DEFINE_bool_ignore(warn_constructors, options::TWO_DASHES, '\0',
|
|
N_("Ignored"), N_("Ignored"));
|
|
|
|
diff -rup binutils.orig/gold/symtab.cc binutils-2.31.1/gold/symtab.cc
|
|
--- binutils.orig/gold/symtab.cc 2018-11-28 13:43:45.193094021 +0000
|
|
+++ binutils-2.31.1/gold/symtab.cc 2018-11-28 13:45:13.479441595 +0000
|
|
@@ -2623,11 +2623,12 @@ Symbol_table::set_dynsym_indexes(unsigne
|
|
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();
|
|
}
|
|
}
|