mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-26 22:51:01 +00:00
binutils: try to make ppc XCOFF weak symbols behave more like ELF
This commit is contained in:
parent
65ffde8261
commit
9f7a6ac3a9
@ -3394,7 +3394,8 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
|
||||
else
|
||||
{
|
||||
if (info->unresolved_syms_in_objects != RM_IGNORE
|
||||
&& (h->flags & XCOFF_WAS_UNDEFINED) != 0)
|
||||
&& (h->flags & XCOFF_WAS_UNDEFINED) != 0
|
||||
&& h->root.type != bfd_link_hash_undefweak)
|
||||
{
|
||||
if (! ((*info->callbacks->undefined_symbol)
|
||||
(info, h->root.root.string,
|
||||
@ -3412,13 +3413,18 @@ xcoff_ppc_relocate_section (bfd *output_bfd,
|
||||
+ sec->output_section->vma
|
||||
+ sec->output_offset);
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_common)
|
||||
{
|
||||
sec = h->root.u.c.p->section;
|
||||
val = (sec->output_section->vma
|
||||
+ sec->output_offset);
|
||||
else if (h->root.type == bfd_link_hash_common)
|
||||
{
|
||||
sec = h->root.u.c.p->section;
|
||||
val = (sec->output_section->vma
|
||||
+ sec->output_offset);
|
||||
|
||||
}
|
||||
}
|
||||
else if (h->root.type == bfd_link_hash_undefweak)
|
||||
{
|
||||
sec = 0;
|
||||
val = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
BFD_ASSERT (info->relocatable
|
||||
|
@ -2773,8 +2773,10 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h)
|
||||
|
||||
/* Treat this symbol as undefined if the descriptor was. */
|
||||
if ((hds->flags & XCOFF_WAS_UNDEFINED) != 0)
|
||||
h->flags |= XCOFF_WAS_UNDEFINED;
|
||||
|
||||
{
|
||||
if(h->root.type != bfd_link_hash_undefweak)
|
||||
h->flags |= XCOFF_WAS_UNDEFINED;
|
||||
}
|
||||
/* Allocate room for the global linkage code itself. */
|
||||
sec = xcoff_hash_table (info)->linkage_section;
|
||||
h->root.type = bfd_link_hash_defined;
|
||||
|
Loading…
Reference in New Issue
Block a user