aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfnn-aarch64.c
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2016-02-26 17:52:34 +0000
committerRenlin Li <renlin.li@arm.com>2016-02-26 18:00:15 +0000
commitc5e3a3641ea9d6ed2918021fd77925825d24e9be (patch)
treea058e83c984b3c516e5ca9005343884bb4a3af6b /bfd/elfnn-aarch64.c
parentbae420ef26f4331415b0503141c5931318025906 (diff)
downloadgdb-c5e3a3641ea9d6ed2918021fd77925825d24e9be.zip
gdb-c5e3a3641ea9d6ed2918021fd77925825d24e9be.tar.gz
gdb-c5e3a3641ea9d6ed2918021fd77925825d24e9be.tar.bz2
[BFD][AARCH64]Fix MOVW_SABS_G(0,1,2) relocation overflow check.
For these three relocations, 17 bit signed value should be used, instead of 16 bit. The bitsize field is changed from 16 to 17, this field in aarch64 backend is used for overflow check only. bfd/ 2016-02-26 Renlin Li <renlin.li@arm.com> * elfnn-aarch64.c (elfNN_aarch64_howto_table): Fix signed overflow check for MOVW_SABS_G0, MOVW_SABS_G1, MOVW_SABS_G2. ld/ 2016-02-26 Renlin Li <renlin.li@arm.com> * testsuite/ld-aarch64/aarch64-elf.exp: Run new testcases. * testsuite/ld-aarch64/emit-relocs-270.d: Update to use new boundary. * testsuite/ld-aarch64/emit-relocs-271.d: Likewise. * testsuite/ld-aarch64/emit-relocs-272.d: Likewise. * testsuite/ld-aarch64/emit-relocs-270-overflow.d: New. * testsuite/ld-aarch64/emit-relocs-270-overflow.s: New. * testsuite/ld-aarch64/emit-relocs-271-overflow.d: New. * testsuite/ld-aarch64/emit-relocs-271-overflow.s: New. * testsuite/ld-aarch64/emit-relocs-272-overflow.d: New. * testsuite/ld-aarch64/emit-relocs-272-overflow.s: New.
Diffstat (limited to 'bfd/elfnn-aarch64.c')
-rw-r--r--bfd/elfnn-aarch64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 16a6eea..599b5f8 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -575,7 +575,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] =
HOWTO (AARCH64_R (MOVW_SABS_G0), /* type */
0, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
@@ -590,7 +590,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] =
HOWTO64 (AARCH64_R (MOVW_SABS_G1), /* type */
16, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
@@ -605,7 +605,7 @@ static reloc_howto_type elfNN_aarch64_howto_table[] =
HOWTO64 (AARCH64_R (MOVW_SABS_G2), /* type */
32, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
+ 17, /* bitsize */
FALSE, /* pc_relative */
0, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */