diff options
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r-- | bfd/elf64-ppc.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 08232a304d..fe46bd53ea 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -4082,22 +4082,21 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, time. */ skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) skip = true; - + else if (outrel.r_offset == (bfd_vma) -2) + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); outrel.r_addend = addend; if (skip) - { - relocate = false; - memset (&outrel, 0, sizeof outrel); - } + memset (&outrel, 0, sizeof outrel); else if (h != NULL && h->dynindx != -1 && !is_opd @@ -4106,10 +4105,7 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, || !info->symbolic || (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)) - { - relocate = false; - outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); - } + outrel.r_info = ELF64_R_INFO (h->dynindx, r_type); else { /* This symbol is local, or marked to become local, |