diff options
author | David S. Miller <davem@redhat.com> | 2010-03-02 01:46:09 +0000 |
---|---|---|
committer | David S. Miller <davem@redhat.com> | 2010-03-02 01:46:09 +0000 |
commit | b48ca1d4920a19e29f98f7d9e5c02c9e14ad12c4 (patch) | |
tree | 34a3324515a8a615ef9a4290905952a6b1c84742 /bfd/elfxx-sparc.c | |
parent | 948ad63d087cd1ec599df9d14da9371d9f4b5718 (diff) | |
download | gdb-b48ca1d4920a19e29f98f7d9e5c02c9e14ad12c4.zip gdb-b48ca1d4920a19e29f98f7d9e5c02c9e14ad12c4.tar.gz gdb-b48ca1d4920a19e29f98f7d9e5c02c9e14ad12c4.tar.bz2 |
* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): When STT_GNU_IFUNC and
h->def_regular, set h->ref_regular.
(allocate_dynrelocs): Only force output of STT_GNU_IFUNC plt entries
and dynamic relocations if h->ref_regular.
Diffstat (limited to 'bfd/elfxx-sparc.c')
-rw-r--r-- | bfd/elfxx-sparc.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index 1947d1a..2137df0 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -1277,7 +1277,10 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h && h->type == STT_GNU_IFUNC) { if (h->def_regular) - h->plt.refcount += 1; + { + h->ref_regular = 1; + h->plt.refcount += 1; + } } /* Compatibility with old R_SPARC_REV32 reloc conflicting @@ -2022,7 +2025,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if ((htab->elf.dynamic_sections_created && h->plt.refcount > 0) || (h->type == STT_GNU_IFUNC - && h->def_regular)) + && h->def_regular + && h->ref_regular)) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -2034,7 +2038,8 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info->shared, h) - || h->type == STT_GNU_IFUNC) + || (h->type == STT_GNU_IFUNC + && h->def_regular)) { asection *s = htab->elf.splt; |