From fd0fd00cded9d641ee55a09edcb62366213357a6 Mon Sep 17 00:00:00 2001 From: Ma Jiang Date: Mon, 13 Jan 2014 16:06:28 +0000 Subject: [PATCH] 2014-01-13 Ma Jiang PR ld/16202 * elf32-arm.c (elf32_arm_final_link_relocate): Refetch addends for R_ARM_ABS8 and R_ARM_ABS16. --- bfd/ChangeLog | 6 ++++++ bfd/elf32-arm.c | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9b30b0c..17fe759 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2014-01-13 Ma Jiang + + 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 * elf32-ppc.c (ppc_elf_check_relocs): For @local call to ifunc, diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 6a9e60f..7216244 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -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. */ -- 2.7.4