summaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@linux-mips.org>2012-08-28 20:17:55 +0000
committerMaciej W. Rozycki <macro@linux-mips.org>2012-08-28 20:17:55 +0000
commit55792834e865a2079bd2ffc2f4a991c4ed737ea7 (patch)
treebaaca28666cc844eacb5696d005c45ee00433735 /bfd/elf64-ppc.c
parent737900de43b56e4f8d6cd1b5d5ac5fc9f5f849f6 (diff)
downloadbinutils-redhat-55792834e865a2079bd2ffc2f4a991c4ed737ea7.tar.gz
* elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is
not minus one. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 50dad3b10e..71403c36f1 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -13118,6 +13118,7 @@ ppc64_elf_relocate_section (bfd *output_bfd,
;
else
{
+ BFD_ASSERT (h->elf.dynindx != -1);
indx = h->elf.dynindx;
unresolved_reloc = FALSE;
}
@@ -13490,7 +13491,10 @@ ppc64_elf_relocate_section (bfd *output_bfd,
else if (!SYMBOL_CALLS_LOCAL (info, &h->elf)
&& !is_opd
&& r_type != R_PPC64_TOC)
- outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
+ {
+ BFD_ASSERT (h->elf.dynindx != -1);
+ outrel.r_info = ELF64_R_INFO (h->elf.dynindx, r_type);
+ }
else
{
/* This symbol is local, or marked to become local,