From a4191ee6badd48f609349456c54c95d579e3aa63 Mon Sep 17 00:00:00 2001 From: amodra Date: Tue, 17 Jun 2003 00:25:44 +0000 Subject: [PATCH] * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero. --- bfd/ChangeLog | 4 ++++ bfd/elf64-ppc.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 26efd2f320..0d6084237a 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2003-06-17 Alan Modra + + * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero. + 2003-06-16 Alan Modra * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 31b52e219d..0536ab0414 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -8349,7 +8349,9 @@ ppc64_elf_relocate_section (output_bfd, info, input_bfd, input_section, addend = outrel.r_addend; /* Adjust pc_relative relocs to have zero in *r_offset. */ else if (ppc64_elf_howto_table[(int) r_type]->pc_relative) - addend = outrel.r_offset; + addend = (input_section->output_section->vma + + input_section->output_offset + + rel->r_offset); } } break; -- 2.11.0