2014-01-13 Ma Jiang <ma.jiang@zte.com.cn>
authorMa Jiang <ma.jiang@zte.com.cn>
Mon, 13 Jan 2014 16:06:28 +0000 (16:06 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 13 Jan 2014 16:06:28 +0000 (16:06 +0000)
PR ld/16202
* elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
R_ARM_ABS8 and R_ARM_ABS16.

bfd/ChangeLog
bfd/elf32-arm.c

index 9b30b0c968599112b1ef1ad0beebb061f790b342..17fe759ee872ea85b33100fbe098a4a9267dc37e 100644 (file)
@@ -1,3 +1,9 @@
+2014-01-13  Ma Jiang  <ma.jiang@zte.com.cn>
+
+       PR ld/16202
+       * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for
+       R_ARM_ABS8 and R_ARM_ABS16.
+
 2014-01-13  Alan Modra  <amodra@gmail.com>
 
        * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc,
index 6a9e60fcab9fdcbf79adfad877a54fb06e9b922e..72162449c3a7b91bf53434528bb07c504922ff5b 100644 (file)
@@ -8609,6 +8609,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
       return bfd_reloc_ok;
 
     case R_ARM_ABS8:
+      /* PR 16202: Refectch the addend using the correct size.  */
+      if (globals->use_rel)
+       addend = bfd_get_8 (input_bfd, hit_data);
       value += addend;
 
       /* There is no way to tell whether the user intended to use a signed or
@@ -8621,6 +8624,9 @@ elf32_arm_final_link_relocate (reloc_howto_type *           howto,
       return bfd_reloc_ok;
 
     case R_ARM_ABS16:
+      /* PR 16202: Refectch the addend using the correct size.  */
+      if (globals->use_rel)
+       addend = bfd_get_16 (input_bfd, hit_data);
       value += addend;
 
       /* See comment for R_ARM_ABS8.  */
This page took 0.034132 seconds and 4 git commands to generate.