mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-20 22:34:14 +08:00
PR ld/12760
* plugin.c (plugin_notice): Set u.undef.abfd for symbols made undefweak.
This commit is contained in:
@ -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>
|
2011-05-16 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* ldlang.c (lang_leave_output_section_statement): Don't copy
|
* ldlang.c (lang_leave_output_section_statement): Don't copy
|
||||||
|
@ -912,6 +912,8 @@ plugin_notice (struct bfd_link_info *info,
|
|||||||
{
|
{
|
||||||
if (h != NULL)
|
if (h != NULL)
|
||||||
{
|
{
|
||||||
|
bfd *sym_bfd;
|
||||||
|
|
||||||
/* No further processing if this def/ref is from an IR dummy BFD. */
|
/* No further processing if this def/ref is from an IR dummy BFD. */
|
||||||
if (is_ir_dummy_bfd (abfd))
|
if (is_ir_dummy_bfd (abfd))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -928,10 +930,13 @@ plugin_notice (struct bfd_link_info *info,
|
|||||||
to be undefined. */
|
to be undefined. */
|
||||||
else if (((h->type == bfd_link_hash_defweak
|
else if (((h->type == bfd_link_hash_defweak
|
||||||
|| h->type == bfd_link_hash_defined)
|
|| 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
|
|| (h->type == bfd_link_hash_common
|
||||||
&& is_ir_dummy_bfd (h->u.c.p->section->owner)))
|
&& is_ir_dummy_bfd (sym_bfd = h->u.c.p->section->owner)))
|
||||||
|
{
|
||||||
h->type = bfd_link_hash_undefweak;
|
h->type = bfd_link_hash_undefweak;
|
||||||
|
h->u.undef.abfd = sym_bfd;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Continue with cref/nocrossref/trace-sym processing. */
|
/* Continue with cref/nocrossref/trace-sym processing. */
|
||||||
|
Reference in New Issue
Block a user