aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorPeter Zotov <whitequark@whitequark.org>2015-09-25 15:21:14 +0100
committerNick Clifton <nickc@redhat.com>2015-09-25 15:21:14 +0100
commit8a9e7a9121490a8c64d8c17f5be510e43104f6d9 (patch)
tree43e5f465538c635dfee83fddab4f3a9e5adeb42d /bfd
parent6cd8405efd699ed7686671d6f0d9caf20757b7a3 (diff)
downloadbinutils-8a9e7a9121490a8c64d8c17f5be510e43104f6d9.zip
binutils-8a9e7a9121490a8c64d8c17f5be510e43104f6d9.tar.gz
binutils-8a9e7a9121490a8c64d8c17f5be510e43104f6d9.tar.bz2
Correct the generation of OR1K pc-relative relocations.
gas PR ld/18759 * config/tc-or1k.c (tc_gen_reloc): Correct computation of PC relative relocs. * config/tc-or1k.h (GAS_CGEN_PRCEL_R_TYPE): Delete. bfd * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE. (R_OR1K_16_PCREL): Likewise. (R_OR1K_8_PCREL): Likewise. ld/tests * ld-elf/eh-frame-hdr: Expect to pass on the or1k-linux target.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-or1k.c6
2 files changed, 10 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c067211..d8068c4 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2015-08-11 Peter Zotov <whitequark@whitequark.org>
+
+ PR ld/18759
+ * elf32-or1k.c (R_OR1K_32_PCREL): Set pcrel_offset to TRUE.
+ (R_OR1K_16_PCREL): Likewise.
+ (R_OR1K_8_PCREL): Likewise.
+
2015-09-23 Nick Clifton <nickc@redhat.com>
* bout.c (b_out_slurp_reloc_table): Cast constant to unsigned in
diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c
index a1eba09..556a9ac 100644
--- a/bfd/elf32-or1k.c
+++ b/bfd/elf32-or1k.c
@@ -199,7 +199,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xffffffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
HOWTO (R_OR1K_16_PCREL,
0, /* rightshift */
@@ -213,7 +213,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xffff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
HOWTO (R_OR1K_8_PCREL,
0, /* rightshift */
@@ -227,7 +227,7 @@ static reloc_howto_type or1k_elf_howto_table[] =
FALSE, /* partial_inplace */
0, /* src_mask */
0xff, /* dst_mask */
- FALSE), /* pcrel_offset */
+ TRUE), /* pcrel_offset */
HOWTO (R_OR1K_GOTPC_HI16, /* Type. */
16, /* Rightshift. */