aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorJiong Wang <jiong.wang@arm.com>2015-08-19 11:02:34 +0100
committerJiong Wang <jiong.wang@arm.com>2015-08-19 16:36:22 +0100
commit49df5539f9070c01128135a7d63f44b2efc4de6a (patch)
tree28a12ac577fd6545eb20e825dd66ad66bd94b2db /gas/testsuite
parent753999c1ec8fa76bd5ed5509d1e5909d010e80ee (diff)
downloadgdb-49df5539f9070c01128135a7d63f44b2efc4de6a.zip
gdb-49df5539f9070c01128135a7d63f44b2efc4de6a.tar.gz
gdb-49df5539f9070c01128135a7d63f44b2efc4de6a.tar.bz2
[AArch64][3/6] GAS support TLSLD move/add relocation types
2015-08-19 Jiong Wang <jiong.wang@arm.com> bfd/ * reloc.c (BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC, BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2): New entries. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * config/tc-aarch64.c (reloc_table): New relocation modifiers, "dtprel_hi12", "dtprel_g0", "dtprel_g0_nc", "dtprel_g1", "dtprel_g1_nc", "dtprel_g2". (md_apply_fix): Support new relocation types. (aarch64_force_relocation): Likewise. (process_movw_reloc_info): Likewise. gas/testsuite/ * gas/aarch64/reloc-dtprel_g0.s: New testcase. * gas/aarch64/reloc-dtprel_g0-ilp32.s: Likewise. * gas/aarch64/reloc-dtprel_g0_nc.s: Likewise. * gas/aarch64/reloc-dtprel_g0_nc-ilp32.s: Likewise. * gas/aarch64/reloc-dtprel_g1.s: Likewise. * gas/aarch64/reloc-dtprel_g1-ilp32.s: Likewise. * gas/aarch64/reloc-dtprel_g1_nc.s: Likewise. * gas/aarch64/reloc-dtprel_g2.s: Likewise. * gas/aarch64/reloc-dtprel_hi12.s: Likewise. * gas/aarch64/reloc-dtprel_hi12-ilp32.s: Likewise. * gas/aarch64/reloc-dtprel_g0.d: New expectation file. * gas/aarch64/reloc-dtprel_g0-ilp32.d: Likewise. * gas/aarch64/reloc-dtprel_g0_nc.d: Likewise. * gas/aarch64/reloc-dtprel_g0_nc-ilp32.d: Likewise. * gas/aarch64/reloc-dtprel_g1.d: Likewise. * gas/aarch64/reloc-dtprel_g1-ilp32.d: Likewise. * gas/aarch64/reloc-dtprel_g1_nc.d: Likewise. * gas/aarch64/reloc-dtprel_g2.d: Likewise. * gas/aarch64/reloc-dtprel_hi12.d: Likewise. * gas/aarch64/reloc-dtprel_hi12-ilp32.d: Likewise.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog23
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.d10
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.d10
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.d10
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g2.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_g2.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.d10
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.s5
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_hi12.d9
-rw-r--r--gas/testsuite/gas/aarch64/reloc-dtprel_hi12.s5
21 files changed, 167 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 3be3dd1..84424b4 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,28 @@
2015-08-19 Jiong Wang <jiong.wang@arm.com>
+ * gas/aarch64/reloc-dtprel_g0.s: New testcase.
+ * gas/aarch64/reloc-dtprel_g0-ilp32.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g0_nc.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g0_nc-ilp32.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g1.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g1-ilp32.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g1_nc.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g2.s: Likewise.
+ * gas/aarch64/reloc-dtprel_hi12.s: Likewise.
+ * gas/aarch64/reloc-dtprel_hi12-ilp32.s: Likewise.
+ * gas/aarch64/reloc-dtprel_g0.d: New expectation file.
+ * gas/aarch64/reloc-dtprel_g0-ilp32.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g0_nc.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g0_nc-ilp32.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g1.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g1-ilp32.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g1_nc.d: Likewise.
+ * gas/aarch64/reloc-dtprel_g2.d: Likewise.
+ * gas/aarch64/reloc-dtprel_hi12.d: Likewise.
+ * gas/aarch64/reloc-dtprel_hi12-ilp32.d: Likewise.
+
+2015-08-19 Jiong Wang <jiong.wang@arm.com>
+
* gas/aarch64/reloc-dtprel_lo12_nc.s: New testcase.
* gas/aarch64/reloc-dtprel_lo12_nc-ilp32.s: Likewise.
* gas/aarch64/reloc-dtprel_lo12_nc.d: New expectation file.
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.d
new file mode 100644
index 0000000..44b6676
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.d
@@ -0,0 +1,10 @@
+#as: -mabi=ilp32
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+00000000 <.*>:
+ 0: 52800009 mov w9, #0x0.*
+ 0: R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.s
new file mode 100644
index 0000000..ebf106e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0-ilp32.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g0 ILP32
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+ movz w9, #:dtprel_g0:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g0.d
new file mode 100644
index 0000000..f1d4c16
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: d2800009 mov x9, #0x0.*
+ 0: R_AARCH64_TLSLD_MOVW_DTPREL_G0 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g0.s
new file mode 100644
index 0000000..201c2a7
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g0
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0
+ movz x9, #:dtprel_g0:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.d
new file mode 100644
index 0000000..c319e3d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.d
@@ -0,0 +1,10 @@
+#as: -mabi=ilp32
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+00000000 <.*>:
+ 0: 72800010 movk w16, #0x0
+ 0: R_AARCH64_P32_TLSLD_MOVW_DTPREL_G0_NC x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.s
new file mode 100644
index 0000000..59881bf
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc-ilp32.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g0_nc ILP32
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
+ movk w16, #:dtprel_g0_nc:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.d
new file mode 100644
index 0000000..68bcc00
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: f2800010 movk x16, #0x0
+ 0: R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.s
new file mode 100644
index 0000000..649b6a2
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g0_nc.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g0_nc
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0_NC
+ movk x16, #:dtprel_g0_nc:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.d
new file mode 100644
index 0000000..6a91806
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.d
@@ -0,0 +1,10 @@
+#as: -mabi=ilp32
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+00000000 <.*>:
+ 0: 52a00009 movz w9, #0x0, lsl #16
+ 0: R_AARCH64_P32_TLSLD_MOVW_DTPREL_G1 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.s
new file mode 100644
index 0000000..1a51e9e
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1-ilp32.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g1 ILP32
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+ movz w9, #:dtprel_g1:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g1.d
new file mode 100644
index 0000000..859da28
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: d2a00009 movz x9, #0x0, lsl #16
+ 0: R_AARCH64_TLSLD_MOVW_DTPREL_G1 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g1.s
new file mode 100644
index 0000000..7dc1685
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g1
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1
+ movz x9, #:dtprel_g1:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.d
new file mode 100644
index 0000000..4a053eb
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: f2a00009 movk x9, #0x0, lsl #16
+ 0: R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.s
new file mode 100644
index 0000000..571f759
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g1_nc.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g1_nc
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1_NC
+ movk x9, #:dtprel_g1_nc:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g2.d b/gas/testsuite/gas/aarch64/reloc-dtprel_g2.d
new file mode 100644
index 0000000..1f2fb2d
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g2.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: d2c0000a movz x10, #0x0, lsl #32
+ 0: R_AARCH64_TLSLD_MOVW_DTPREL_G2 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_g2.s b/gas/testsuite/gas/aarch64/reloc-dtprel_g2.s
new file mode 100644
index 0000000..9e11002
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_g2.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_g2
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G2
+ movz x10, #:dtprel_g2:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.d
new file mode 100644
index 0000000..0235aeb
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.d
@@ -0,0 +1,10 @@
+#as: -mabi=ilp32
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+00000000 <.*>:
+ 0: 11000341 add w1, w26, #0x0
+ 0: R_AARCH64_P32_TLSLD_ADD_DTPREL_HI12 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.s
new file mode 100644
index 0000000..3d1b852
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12-ilp32.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_hi12 ILP32
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
+ add w1, w26, #:dtprel_hi12:x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.d b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.d
new file mode 100644
index 0000000..84cec8c
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.d
@@ -0,0 +1,9 @@
+#objdump: -dr
+
+.*: file format .*
+
+Disassembly of section \.text:
+
+0000000000000000 <.*>:
+ 0: 91000341 add x1, x26, #0x0
+ 0: R_AARCH64_TLSLD_ADD_DTPREL_HI12 x
diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.s b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.s
new file mode 100644
index 0000000..c4a5cb6
--- /dev/null
+++ b/gas/testsuite/gas/aarch64/reloc-dtprel_hi12.s
@@ -0,0 +1,5 @@
+// Test file for AArch64 GAS -- dtprel_hi12
+
+func:
+ // BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12
+ add x1, x26, #:dtprel_hi12:x