aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRenlin Li <renlin.li@arm.com>2015-10-02 15:42:01 +0100
committerRenlin Li <renlin.li@arm.com>2015-10-02 17:56:07 +0100
commitca632371cebf83eb9b5ce951bbe734e7636aa614 (patch)
tree2c573f869ea2f02307e9e031c881621820dcdcce /gas
parent74a1bfe1d6e7e85fffad518f50575a44630d9293 (diff)
downloadgdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.zip
gdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.tar.gz
gdb-ca632371cebf83eb9b5ce951bbe734e7636aa614.tar.bz2
[GAS][AARCH64]Add BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC Support.
bfd/ 2015-10-02 Renlin Li <renlin.li@arm.com> * reloc.c (BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC): New. * elfnn-aarch64.c (elfNN_aarch64_howto_table): New entry MOVW_GOTOFF_G0_NC. * libbfd.h: Regnerate. * bfd-in2.h: Regenerate. gas/ 2015-10-02 Renlin Li <renlin.li@arm.com> * config/tc-aarch64.c (reloc_table): New relocation modifier gotoff_g0_nc. (process_movw_reloc_info): Support gotoff_g0_nc. (md_apply_fix): Likewise. gas/testsuite/ 2015-10-02 Renlin Li <renlin.li@arm.com> * gas/aarch64/reloc-gotoff_g0_nc.s: New. * gas/aarch64/reloc-gotoff_g0_nc.d: New.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/config/tc-aarch64.c11
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.s5
5 files changed, 37 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 0492801..63b9805 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,10 @@
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
+ * config/tc-aarch64.c (reloc_table): New relocation modifier
+ gotoff_g0_nc.
+ (process_movw_reloc_info): Support gotoff_g0_nc.
+ (md_apply_fix): Likewise.
+
2015-10-02 Renlin Li <renlin.li@arm.com>
* config/tc-aarch64.c (reloc_table): New relocation modifier
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 1b0e69b..1b62b39 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -2455,6 +2455,15 @@ static struct reloc_table_entry reloc_table[] = {
BFD_RELOC_AARCH64_LD_GOT_LO12_NC,
0},
+ /* 0-15 bits of address/value: MOVk, no check. */
+ {"gotoff_g0_nc", 0,
+ 0, /* adr_type */
+ 0,
+ BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC,
+ 0,
+ 0,
+ 0},
+
/* Most significant bits 16-31 of address/value: MOVZ. */
{"gotoff_g1", 0,
0, /* adr_type */
@@ -4676,6 +4685,7 @@ process_movw_reloc_info (void)
case BFD_RELOC_AARCH64_MOVW_G0:
case BFD_RELOC_AARCH64_MOVW_G0_NC:
case BFD_RELOC_AARCH64_MOVW_G0_S:
+ case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0:
case BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC:
case BFD_RELOC_AARCH64_TLSLE_MOVW_TPREL_G0:
@@ -6799,6 +6809,7 @@ md_apply_fix (fixS * fixP, valueT * valP, segT seg)
case BFD_RELOC_AARCH64_MOVW_G0:
case BFD_RELOC_AARCH64_MOVW_G0_NC:
case BFD_RELOC_AARCH64_MOVW_G0_S:
+ case BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC:
scale = 0;
goto movw_common;
case BFD_RELOC_AARCH64_MOVW_G1:
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 5f5e35c..585d354 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-02 Renlin Li <renlin.li@arm.com>
+
+ * gas/aarch64/reloc-gotoff_g0_nc.s: New.
+ * gas/aarch64/reloc-gotoff_g0_nc.d: New.
+
2015-10-02 Renlin Li <renlin.li@arm.com>
* gas/aarch64/reloc-gotoff_g1.s: New.
diff --git a/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.d b/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.d
new file mode 100644
index 0000000..4c0bc60
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: f280001c movk x28, #0x0
+ 0: R_AARCH64_MOVW_GOTOFF_G0_NC x
diff --git a/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.s b/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.s
new file mode 100644
index 0000000..2affa03
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-gotoff_g0_nc.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- gotoff_g0_nc
+
+func:
+ // BFD_RELOC_AARCH64_MOVW_GOTOFF_G0_NC
+ movk x28, #:gotoff_g0_nc:x