From: Casey Smith Date: Wed, 7 Jun 2017 12:52:58 +0000 (+0100) Subject: Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when... X-Git-Tag: users/ARM/embedded-binutils-2_28-branch-2017q2~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1898f468867e1f997a0cc10ad61647a3b623c4b7;p=thirdparty%2Fbinutils-gdb.git Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when generating a SUB instruction. 2017-05-30 Casey Smith 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 --git a/bfd/ChangeLog b/bfd/ChangeLog index 50fbe3a6778..5c02f54e29e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2017-06-07 Nick Clifton + + Import this fix from upstream: + + 2017-05-30 Casey Smith + + 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 PR 21529 diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index e04caef5ac6..cc8fd15cade 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;