From 55792834e865a2079bd2ffc2f4a991c4ed737ea7 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Tue, 28 Aug 2012 20:17:55 +0000 Subject: * elf32-ppc.c (ppc_elf_relocate_section): Assert that dynindx is not minus one. * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. --- bfd/elf32-ppc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bfd/elf32-ppc.c') diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 779ca6d25b..3d55ac42d9 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -7826,6 +7826,7 @@ ppc_elf_relocate_section (bfd *output_bfd, ; else { + BFD_ASSERT (h->dynindx != -1); indx = h->dynindx; unresolved_reloc = FALSE; } @@ -8176,6 +8177,7 @@ ppc_elf_relocate_section (bfd *output_bfd, || h->root.type == bfd_link_hash_undefweak)) || !SYMBOL_REFERENCES_LOCAL (info, h)) { + BFD_ASSERT (h->dynindx != -1); unresolved_reloc = FALSE; outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); outrel.r_addend = rel->r_addend; -- cgit v1.2.1