diff options
author | Alan Modra <amodra@gmail.com> | 2011-05-16 00:58:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2011-05-16 00:58:11 +0000 |
commit | cd6eee13dff4086441a722998577207ef9d2a2c5 (patch) | |
tree | eb2c06c6580dfdc661a5017423e22aaf5b49e326 /ld | |
parent | 83e7bd17d6eb0cc0335fa33047e197b8646a0b4d (diff) | |
download | binutils-cd6eee13dff4086441a722998577207ef9d2a2c5.zip binutils-cd6eee13dff4086441a722998577207ef9d2a2c5.tar.gz binutils-cd6eee13dff4086441a722998577207ef9d2a2c5.tar.bz2 |
PR ld/12760
* plugin.c (plugin_notice): Set u.undef.abfd for symbols made
undefweak.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/plugin.c | 11 |
2 files changed, 14 insertions, 3 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index b8ecfc3..c26c7dd 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2011-05-16 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/12760 + * plugin.c (plugin_notice): Set u.undef.abfd for symbols made + undefweak. + 2011-05-16 Alan Modra <amodra@gmail.com> * ldlang.c (lang_leave_output_section_statement): Don't copy diff --git a/ld/plugin.c b/ld/plugin.c index 8d9603b..07c6068 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -912,6 +912,8 @@ plugin_notice (struct bfd_link_info *info, { if (h != NULL) { + bfd *sym_bfd; + /* No further processing if this def/ref is from an IR dummy BFD. */ if (is_ir_dummy_bfd (abfd)) return TRUE; @@ -928,10 +930,13 @@ plugin_notice (struct bfd_link_info *info, to be undefined. */ else if (((h->type == bfd_link_hash_defweak || h->type == bfd_link_hash_defined) - && is_ir_dummy_bfd (h->u.def.section->owner)) + && is_ir_dummy_bfd (sym_bfd = h->u.def.section->owner)) || (h->type == bfd_link_hash_common - && is_ir_dummy_bfd (h->u.c.p->section->owner))) - h->type = bfd_link_hash_undefweak; + && is_ir_dummy_bfd (sym_bfd = h->u.c.p->section->owner))) + { + h->type = bfd_link_hash_undefweak; + h->u.undef.abfd = sym_bfd; + } } /* Continue with cref/nocrossref/trace-sym processing. */ |