From 4c5625238cccb048261d7ce0eb748ee5e0d67cf0 Mon Sep 17 00:00:00 2001 From: Jiong Wang Date: Wed, 19 Aug 2015 11:22:22 +0100 Subject: [AArch64][5/6] GAS support TLSLD load/store relocation types 2015-08-19 Jiong Wang bfd/ * reloc.c: New entries, including BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC. BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC. * elfnn-aarch64.c (elfNN_aarch64_howto_table): Likewise. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. gas/ * config/tc-aarch64.c (reloc_table): New relocation types support for dtprel_lo12. (ldst_lo12_determine_real_reloc_type): Support BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC. (parse_operands): Likewise. (md_apply_fix): Likewise (aarch64_force_relocation): Likewise. (process_movw_reloc_info): Likewise. gas/testsuite/ * gas/aarch64/reloc-dtprel_lo12-ldst8.s: New testcase. * gas/aarch64/reloc-dtprel_lo12_nc-ldstc.s: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst16.s: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst32.s: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst64.s: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst8.d: New expectation file. * gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst16.d: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d: Likewise. * gas/aarch64/reloc-dtprel_lo12-ldst32.d: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d: Likewise. * gas/aarch64/reloc-dtprel-lo12-ldst64.d: Likewise. * gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d: Likewise. --- gas/testsuite/ChangeLog | 19 +++++++++++++++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d | 10 ++++++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.s | 6 ++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d | 10 ++++++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.s | 6 ++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d | 10 ++++++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.s | 6 ++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d | 10 ++++++++++ gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.s | 6 ++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d | 10 ++++++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s | 5 +++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d | 10 ++++++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s | 6 ++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d | 10 ++++++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s | 6 ++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d | 10 ++++++++++ .../gas/aarch64/reloc-dtprel_lo12_nc-ldst8.s | 6 ++++++ 17 files changed, 146 insertions(+) create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d create mode 100644 gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.s (limited to 'gas/testsuite') diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 84424b4..a12b7b4 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,5 +1,24 @@ 2015-08-19 Jiong Wang + * gas/aarch64/reloc-dtprel-lo12-ldst8.s: New testcase. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst8.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst16.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst16.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst32.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst32.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst64.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst64.s: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst8.d: New expectation file. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst8.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst16.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst16.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst32.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst32.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12-ldst64.d: Likewise. + * gas/aarch64/reloc-dtprel-lo12_nc-ldst64.d: Likewise. + +2015-08-19 Jiong Wang + * gas/aarch64/reloc-dtprel_g0.s: New testcase. * gas/aarch64/reloc-dtprel_g0-ilp32.s: Likewise. * gas/aarch64/reloc-dtprel_g0_nc.s: Likewise. diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d new file mode 100644 index 0000000..fec41b2 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: 7980009b ldrsh x27, \[x4\] + 0: R_AARCH64_TLSLD_LDST16_DTPREL_LO12 sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.s new file mode 100644 index 0000000..a9ac0c5 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst16.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12 for LDST16 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12 + ldrsh x27, [x4, #:dtprel_lo12:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d new file mode 100644 index 0000000..74f122c --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: b980009b ldrsw x27, \[x4\] + 0: R_AARCH64_TLSLD_LDST32_DTPREL_LO12 sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.s new file mode 100644 index 0000000..18ad0f0 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst32.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12 for LDST32 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12 + ldrsw x27, [x4, #:dtprel_lo12:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d new file mode 100644 index 0000000..c8858f8 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: f940009b ldr x27, \[x4\] + 0: R_AARCH64_TLSLD_LDST64_DTPREL_LO12 sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.s new file mode 100644 index 0000000..7a017f6 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst64.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12 for LDST64 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12 + ldr x27, [x4, #:dtprel_lo12:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d new file mode 100644 index 0000000..3b6560e --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: 39800115 ldrsb x21, \[x8\] + 0: R_AARCH64_TLSLD_LDST8_DTPREL_LO12 sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.s new file mode 100644 index 0000000..7391376 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12-ldst8.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12 for LDST8 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12 + ldrsb x21, [x8, #:dtprel_lo12:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d new file mode 100644 index 0000000..1b24e1c --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: 7940009b ldrh w27, \[x4\] + 0: R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s new file mode 100644 index 0000000..3262a8f --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst16.s @@ -0,0 +1,5 @@ +// Test file for AArch64 GAS -- dtprel_lo12_nc for LDST16 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC + ldrh w27, [x4, #:dtprel_lo12_nc:sym] diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d new file mode 100644 index 0000000..883e427 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: b98000f4 ldrsw x20, \[x7\] + 0: R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s new file mode 100644 index 0000000..60f1c70 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst32.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12_nc for LDST32 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC + ldrsw x20, [x7, #:dtprel_lo12_nc:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d new file mode 100644 index 0000000..fd9e1cb --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: f940009b ldr x27, \[x4\] + 0: R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s new file mode 100644 index 0000000..d5da5cb --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst64.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12_nc for LDST64 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC + ldr x27, [x4, #:dtprel_lo12_nc:sym] + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d new file mode 100644 index 0000000..76adce0 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.d @@ -0,0 +1,10 @@ +#objdump: -dr + +.*: file format .* + +Disassembly of section \.text: + +0000000000000000 <.*>: + 0: 3940005d ldrb w29, \[x2\] + 0: R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC sym + diff --git a/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.s b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.s new file mode 100644 index 0000000..80648e0 --- /dev/null +++ b/gas/testsuite/gas/aarch64/reloc-dtprel_lo12_nc-ldst8.s @@ -0,0 +1,6 @@ +// Test file for AArch64 GAS -- dtprel_lo12_nc for LDST8 + +func: + // BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC + ldrb w29, [x2, #:dtprel_lo12_nc:sym] + -- cgit v1.1