summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-11-25 02:14:25 +0000
committerAlan Modra <amodra@bigpond.net.au>2003-11-25 02:14:25 +0000
commit58accff8c14f20854e4990398ace4ab0b875d50d (patch)
treeb5c2a83574c518e7a00b4d76f3ce56e62fd523cb
parentcef151a5bfaa9a98ea8428d5e3788322d5af6fc0 (diff)
downloadbinutils-redhat-58accff8c14f20854e4990398ace4ab0b875d50d.tar.gz
* elf64-ppc.c (ppc_type_of_stub): Disallow stubs other than
ppc_stub_plt_call to symbols defined in shared libs.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf64-ppc.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9010d72188..4972458e47 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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.
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 96e1d230fc..7e7e5ba7bf 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -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;
}