This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Don't handle every plugin symbol as defined.
- From: Rafael "थvila" de "Espथऐndola" <espindola at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 3 Mar 2016 20:18:16 -0000
- Subject: [binutils-gdb] Don't handle every plugin symbol as defined.
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a06ed37d755d3bb76c69980f13d22927c8967844
commit a06ed37d755d3bb76c69980f13d22927c8967844
Author: Rafael Ã?vila de EspÃndola <rafael.espindola@gmail.com>
Date: Thu Mar 3 14:42:21 2016 -0500
Don't handle every plugin symbol as defined.
Gold was fetching --start-lib/--end-lib members if that member defined
or used a currently undefined symbol.
Diff:
---
gold/ChangeLog | 5 +++++
gold/plugin.cc | 2 ++
2 files changed, 7 insertions(+)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 2d8193a..ca90470 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-03 Rafael Ã?vila de EspÃndola <rafael.espindola@gmail.com>
+
+ * plugin.cc (do_should_include_member): Ignore LDPK_UNDEF and
+ LDPK_WEAKUNDEF symbols.
+
2015-03-03 Evgenii Stepanov <eugenis@google.com>
* plugin.h (Pluginobj::get_symbol_resolution_info): Add version
diff --git a/gold/plugin.cc b/gold/plugin.cc
index bb7d6b2..026748f 100644
--- a/gold/plugin.cc
+++ b/gold/plugin.cc
@@ -1179,6 +1179,8 @@ Sized_pluginobj<size, big_endian>::do_should_include_member(
for (int i = 0; i < this->nsyms_; ++i)
{
const struct ld_plugin_symbol& sym = this->syms_[i];
+ if (sym.def == LDPK_UNDEF || sym.def == LDPK_WEAKUNDEF)
+ continue;
const char* name = sym.name;
Symbol* symbol;
Archive::Should_include t = Archive::should_include_member(symtab,