• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisão8a9e8e72fe88095043d16f8a56b5a1e150ee288b (tree)
Hora2016-08-27 09:12:09
AutorAlan Modra <amodra@gmai...>
CommiterAlan Modra

Mensagem de Log

Fix commit 980aa3e6

Commit 980aa3e6 was supposed to cure dyn_reloc counting problems, but
did the opposite. For PIC we count two types of dyn_reloc, those on
pc-relative relocs, and the total. If a sym needs pc-relative dyn
relocs then all the relocs are dynamic. If not, then only those that
are must_be_dyn_reloc are dynamic.

PR 20519
* elf64-ppc.c (pc_dynrelocs): New function.
(ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
handle pic dynamic relocs.

Mudança Sumário

Diff

--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
1+2016-08-27 Alan Modra <amodra@gmail.com>
2+
3+ PR 20519
4+ * elf64-ppc.c (pc_dynrelocs): New function.
5+ (ppc64_elf_relocate_section): Use it and must_be_dyn_reloc to
6+ handle pic dynamic relocs.
7+
18 2016-08-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
29
310 * bfd-in.h (struct elf32_arm_params): Define.
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -7173,6 +7173,19 @@ alias_readonly_dynrelocs (struct elf_link_hash_entry *h)
71737173 return FALSE;
71747174 }
71757175
7176+/* Return whether EH has pc-relative dynamic relocs. */
7177+
7178+static bfd_boolean
7179+pc_dynrelocs (struct ppc_link_hash_entry *eh)
7180+{
7181+ struct elf_dyn_relocs *p;
7182+
7183+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
7184+ if (p->pc_count != 0)
7185+ return TRUE;
7186+ return FALSE;
7187+}
7188+
71767189 /* Return true if a global entry stub will be created for H. Valid
71777190 for ELFv2 before plt entries have been allocated. */
71787191
@@ -14745,10 +14758,11 @@ ppc64_elf_relocate_section (bfd *output_bfd,
1474514758 if (NO_OPD_RELOCS && is_opd)
1474614759 break;
1474714760
14748- if (h != NULL
14749- ? h->dyn_relocs != NULL
14750- : (bfd_link_pic (info)
14751- ? must_be_dyn_reloc (info, r_type)
14761+ if (bfd_link_pic (info)
14762+ ? ((h != NULL && pc_dynrelocs (h))
14763+ || must_be_dyn_reloc (info, r_type))
14764+ : (h != NULL
14765+ ? h->dyn_relocs != NULL
1475214766 : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC))
1475314767 {
1475414768 bfd_boolean skip, relocate;