aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2010-01-19 03:49:43 +0000
committerAlan Modra <amodra@gmail.com>2010-01-19 03:49:43 +0000
commitf6ebfac0855915796ac643b48c13e4020906af5c (patch)
tree0e66a9365fc9e8228b42a4c5702fa23e51267c96 /bfd
parent1969a62a7c93b10fe58edca35d4bbb1739886dc8 (diff)
downloadgdb-f6ebfac0855915796ac643b48c13e4020906af5c.zip
gdb-f6ebfac0855915796ac643b48c13e4020906af5c.tar.gz
gdb-f6ebfac0855915796ac643b48c13e4020906af5c.tar.bz2
* elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
R_ARM_THM_CALL entry. (elf32_arm_final_link_relocate): Correct calculation of reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22, or R_ARM_THM_JUMP24 relocation.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/elf32-arm.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6daeaf5..1801912 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2010-01-19 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * elf32-arm.c (elf32_arm_howto_table_1): Correct bitsize of
+ R_ARM_THM_CALL entry.
+ (elf32_arm_final_link_relocate): Correct calculation of
+ reloc_signed_max when doing a R_ARM_THM_CALL, R_ARM_THM_XPC22,
+ or R_ARM_THM_JUMP24 relocation.
+
2010-01-18 Alan Modra <amodra@gmail.com>
PR 11168
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 3e9759b..8f00e21 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -1,6 +1,6 @@
/* 32-bit ELF support for ARM
Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009 Free Software Foundation, Inc.
+ 2008, 2009, 2010 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -222,7 +222,7 @@ static reloc_howto_type elf32_arm_howto_table_1[] =
HOWTO (R_ARM_THM_CALL, /* type */
1, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 25, /* bitsize */
+ 24, /* bitsize */
TRUE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed,/* complain_on_overflow */
@@ -7552,7 +7552,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
bitsize = howto->bitsize;
if (!thumb2)
bitsize -= 2;
- reloc_signed_max = ((1 << (bitsize - 1)) - 1) >> howto->rightshift;
+ reloc_signed_max = (1 << (bitsize - 1)) - 1;
reloc_signed_min = ~reloc_signed_max;
/* Assumes two's complement. */