* elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
authorAlan Modra <amodra@gmail.com>
Tue, 25 Nov 2003 02:14:25 +0000 (02:14 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Nov 2003 02:14:25 +0000 (02:14 +0000)
ppc_stub_plt_call to symbols defined in shared libs.

bfd/ChangeLog
bfd/elf64-ppc.c

index 9010d72188a01ab141a2e3f518c61045dec083b2..4972458e47fff2869dc4d6392a492bd242f07d31 100644 (file)
@@ -1,3 +1,8 @@
+2003-11-25  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
+       ppc_stub_plt_call to symbols defined in shared libs.
+
 2003-11-22  Jakub Jelinek  <jakub@redhat.com>
 
        * elf-bfd.h (ELF_LINK_POINTER_EQUALITY_NEEDED): Define new flag.
index 96e1d230fc9584302b97255dbddb1f82700ffd4d..7e7e5ba7bfddad58e930c417b127833a11926d64 100644 (file)
@@ -6070,8 +6070,9 @@ ppc_type_of_stub (asection *input_sec,
              }
        }
 
-      if (h->elf.root.type != bfd_link_hash_defined
-         && h->elf.root.type != bfd_link_hash_defweak)
+      if (!(h->elf.root.type == bfd_link_hash_defined
+           || h->elf.root.type == bfd_link_hash_defweak)
+         || h->elf.root.u.def.section->output_section == NULL)
        return ppc_stub_none;
     }