Fix "unresolved reloc" error for NOTOC relocs
authorAlan Modra <amodra@gmail.com>
Thu, 23 Aug 2018 04:04:29 +0000 (13:34 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 23 Aug 2018 04:24:24 +0000 (13:54 +0930)
* elf64-ppc.c (ppc64_elf_relocate_section): Don't miss clearing
unresolved_reloc on ppc_stub_plt_call_notoc.

bfd/ChangeLog
bfd/elf64-ppc.c

index 73873924a1b4a8359f377a3a4fe1ac8a54b55861..f24ef2be137827cd7ae4db7255aefb7464ab37e0 100644 (file)
@@ -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
index 2b5b50092a8ab2c080b60fb09b6c5a7c4b735639..1a40fa967392f8fae5b039aa0ec13bc29949ba42 100644 (file)
@@ -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