aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorMa Jiang <ma.jiang@zte.com.cn>2014-01-13 16:06:28 +0000
committerNick Clifton <nickc@redhat.com>2014-01-13 16:06:28 +0000
commitfd0fd00cded9d641ee55a09edcb62366213357a6 (patch)
tree29bff7e19fec8a997486757c4d062176506b1c2b /bfd/elf32-arm.c
parentf8de51293246a17166da9a2744c1eb5ab956d67b (diff)
downloadgdb-fd0fd00cded9d641ee55a09edcb62366213357a6.zip
gdb-fd0fd00cded9d641ee55a09edcb62366213357a6.tar.gz
gdb-fd0fd00cded9d641ee55a09edcb62366213357a6.tar.bz2
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.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c6
1 files changed, 6 insertions, 0 deletions
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. */