]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Import a fix from upstream that allows the ARM ADR pseudo-instruction to work when...
authorCasey Smith <clegg89@gmail.com>
Wed, 7 Jun 2017 12:52:58 +0000 (13:52 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 7 Jun 2017 12:52:58 +0000 (13:52 +0100)
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.

bfd/ChangeLog
bfd/elf32-arm.c

index 50fbe3a67782a6760ab8901b916e951616d42675..5c02f54e29e671a47536bea577d30a11defe2c3a 100644 (file)
@@ -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
index e04caef5ac6d2ff1b86273a095822213a8d97f75..cc8fd15cadebcf367372e770a530c1652b2e0476 100644 (file)
@@ -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;