This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb/binutils-2_28-branch] Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when generating a SUB
- From: Nick Clifton <nickc at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 7 Jun 2017 12:54:08 -0000
- Subject: [binutils-gdb/binutils-2_28-branch] Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when generating a SUB
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1898f468867e1f997a0cc10ad61647a3b623c4b7
commit 1898f468867e1f997a0cc10ad61647a3b623c4b7
Author: Casey Smith <clegg89@gmail.com>
Date: Wed Jun 7 13:52:58 2017 +0100
Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when generating a SUB instruction.
2017-05-30 Casey Smith <clegg89@gmail.com>
PR ld/21523
* elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
Diff:
---
bfd/ChangeLog | 10 ++++++++++
bfd/elf32-arm.c | 4 +++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 50fbe3a..5c02f54 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+2017-06-07 Nick Clifton <nickc@redhat.com>
+
+ Import this fix from upstream:
+
+ 2017-05-30 Casey Smith <clegg89@gmail.com>
+
+ PR ld/21523
+ * elf32-arm.c (elf32_arm_final_link_relocate): Install an absolute
+ value when processing the R_ARM_THM_ALU_PREL_11_0 reloc.
+
2017-06-05 Alan Modra <amodra@gmail.com>
PR 21529
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index e04caef..cc8fd15 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -10505,7 +10505,9 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ input_section->output_offset
+ rel->r_offset);
- value = relocation;
+ /* PR 21523: Use an absolute value. The user of this reloc will
+ have already selected an ADD or SUB insn appropriately. */
+ value = abs (relocation);
if (value >= 0x1000)
return bfd_reloc_overflow;