aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-06-17 00:25:45 +0000
committerAlan Modra <amodra@gmail.com>2003-06-17 00:25:45 +0000
commit000732f7537b9ac201992ed61032572b0b24ee1c (patch)
tree1935f5abc4ea3966e2321f005c83faa95cf2dd09 /bfd
parentba0b21743576bcc16dcc7f0cd8f17b55519e5913 (diff)
downloadgdb-000732f7537b9ac201992ed61032572b0b24ee1c.zip
gdb-000732f7537b9ac201992ed61032572b0b24ee1c.tar.gz
gdb-000732f7537b9ac201992ed61032572b0b24ee1c.tar.bz2
* elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf64-ppc.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 26efd2f..0d60842 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2003-06-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
+
2003-06-16 Alan Modra <amodra@bigpond.net.au>
* elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 31b52e2..0536ab0 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;