[binutils-gdb] Fix "unresolved reloc" error for NOTOC relocs
Alan Modra
amodra@sourceware.org
Thu Aug 23 04:25:00 GMT 2018
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d0abeec8d45514fbec790f27e3cadceb576df9b5
commit d0abeec8d45514fbec790f27e3cadceb576df9b5
Author: Alan Modra <amodra@gmail.com>
Date: Thu Aug 23 13:34:29 2018 +0930
Fix "unresolved reloc" error for NOTOC relocs
* elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
unresolved_reloc on ppc_stub_plt_call_notoc.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elf64-ppc.c | 5 ++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7387392..f24ef2b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-08-23 Alan Modra <amodra@gmail.com>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
+ unresolved_reloc on ppc_stub_plt_call_notoc.
+
2018-08-22 H.J. Lu <hongjiu.lu@intel.com>
PR ld/23536
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 2b5b500..1a40fa9 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -13887,9 +13887,8 @@ ppc64_elf_relocate_section (bfd *output_bfd,
stub_entry = NULL;
if (stub_entry != NULL
- && (stub_entry->stub_type == ppc_stub_plt_call
- || stub_entry->stub_type == ppc_stub_plt_call_r2save
- || stub_entry->stub_type == ppc_stub_plt_call_both
+ && ((stub_entry->stub_type >= ppc_stub_plt_call
+ && stub_entry->stub_type <= ppc_stub_plt_call_both)
|| stub_entry->stub_type == ppc_stub_plt_branch_r2off
|| stub_entry->stub_type == ppc_stub_plt_branch_both
|| stub_entry->stub_type == ppc_stub_long_branch_r2off
More information about the Binutils-cvs
mailing list