aboutsummaryrefslogtreecommitdiff
path: root/gas/testsuite
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-05-30 22:01:38 +0000
committerRichard Henderson <rth@redhat.com>2002-05-30 22:01:38 +0000
commit3765b1be13d34da8aae366959c3601a09afa193b (patch)
tree7b2ce41ab018a2991eb62806cf965c9cd9c00df4 /gas/testsuite
parent0085b5a8ab186588ad7ae8baba6e82794837fbaf (diff)
downloadgdb-3765b1be13d34da8aae366959c3601a09afa193b.zip
gdb-3765b1be13d34da8aae366959c3601a09afa193b.tar.gz
gdb-3765b1be13d34da8aae366959c3601a09afa193b.tar.bz2
include/elf/
* alpha.h (R_ALPHA_TLSGD, R_ALPHA_TLSLDM, R_ALPHA_DTPMOD64, R_ALPHA_GOTDTPREL, R_ALPHA_DTPREL64, R_ALPHA_DTPRELHI, R_ALPHA_DTPRELLO, R_ALPHA_DTPREL16, R_ALPHA_GOTTPREL, R_ALPHA_TPREL64, R_ALPHA_TPRELHI, R_ALPHA_TPRELLO, R_ALPHA_TPREL16): New. bfd/ * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD, ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New. (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove. (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove. (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated. (struct alpha_elf_obj_tdata): Rename total_got_entries and n_local_got_entries to total_got_size and local_got_size. (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs. (alpha_got_entry_size): New. (elf64_alpha_relax_with_lituse): Use it. (elf64_alpha_relax_without_lituse): Likewise. (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES. (get_got_entry): New. (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize. (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask. (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type. (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise. (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size. (elf64_alpha_calc_got_offsets): Likewise. (alpha_dynamic_entries_for_reloc): New. (elf64_alpha_calc_dynrel_sizes): Use it. (elf64_alpha_size_dynamic_sections): Likewise. (elf64_alpha_relocate_section): Handle TLS relocations. * reloc.c: Add Alpha TLS relocations. * bfd-in2.h, libbfd.h: Rebuild. gas/ * expr.h (operatorT): Add O_md17..O_md32. * config/tc-alpha.c (O_lituse_tlsgd, O_lituse_tlsldm, O_tlsgd, O_tlsldm, O_gotdtprel, O_dtprelhi, O_dtprello, O_dtprel, O_gottprel, O_tprelhi, O_tprello, O_tprel): New. (USER_RELOC_P, alpha_reloc_op_tag, debug_exp): Include them. (DUMMY_RELOC_LITUSE_TLSGD, DUMMY_RELOC_LITUSE_TLSLDM): New. (LITUSE_TLSGD, LITUSE_TLSLDM): New. (struct alpha_reloc_tag): Add master, saw_tlsgd, saw_tlsld, saw_lu_tlsgd, saw_lu_tlsldm. Make multi_section_p a bit field. (md_apply_fix3): Handle TLS relocations. (alpha_force_relocation, alpha_fix_adjustable): Likewise. (alpha_adjust_symtab_relocs): Sort LITERAL relocs after the associated TLS reloc. Check lituse_tls relocs match up. (emit_insn): Handle TLS relocations. (ldX_op): Remove. gas/testsuite/ * gas/alpha/elf-tls-1.s, gas/alpha/elf-tls-1.d: New. * gas/alpha/elf-tls-2.s, gas/alpha/elf-tls-1.l: New. * gas/alpha/elf-tls-3.s, gas/alpha/elf-tls-1.l: New. * gas/alpha/alpha.exp: Run them.
Diffstat (limited to 'gas/testsuite')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/alpha/alpha.exp3
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-1.d29
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-1.s24
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-2.l9
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-2.s32
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-3.l7
-rw-r--r--gas/testsuite/gas/alpha/elf-tls-3.s22
8 files changed, 133 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index ff91d8d..9554e69 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2002-05-30 Richard Henderson <rth@redhat.com>
+
+ * gas/alpha/elf-tls-1.s, gas/alpha/elf-tls-1.d: New.
+ * gas/alpha/elf-tls-2.s, gas/alpha/elf-tls-1.l: New.
+ * gas/alpha/elf-tls-3.s, gas/alpha/elf-tls-1.l: New.
+ * gas/alpha/alpha.exp: Run them.
+
2002-05-30 Tom Rix <trix@redhat.com>
* gas/d10v/d10v.exp: Add -gstabs packing, sequence control
diff --git a/gas/testsuite/gas/alpha/alpha.exp b/gas/testsuite/gas/alpha/alpha.exp
index 89a6334..6564cf9 100644
--- a/gas/testsuite/gas/alpha/alpha.exp
+++ b/gas/testsuite/gas/alpha/alpha.exp
@@ -29,6 +29,9 @@ if { [istarget alpha*-*-*] } then {
run_dump_test "elf-reloc-4"
run_dump_test "elf-reloc-5"
run_list_test "elf-reloc-6" ""
+ run_dump_test "elf-tls-1"
+ run_list_test "elf-tls-2" ""
+ run_list_test "elf-tls-3" ""
}
run_dump_test "fp"
diff --git a/gas/testsuite/gas/alpha/elf-tls-1.d b/gas/testsuite/gas/alpha/elf-tls-1.d
new file mode 100644
index 0000000..7f80de7
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-1.d
@@ -0,0 +1,29 @@
+#objdump: -r
+#name: alpha elf-tls-1
+
+.*: file format elf64-alpha
+
+RELOCATION RECORDS FOR \[\.text\]:
+OFFSET TYPE VALUE
+0*0000004 TLSGD a
+0*0000000 ELF_LITERAL __tls_get_addr
+0*0000008 LITUSE \.text\+0x0*0000004
+0*0000008 HINT __tls_get_addr
+0*000000c HINT __tls_get_addr
+0*0000014 TLSLDM b
+0*0000010 ELF_LITERAL __tls_get_addr
+0*000000c LITUSE \.text\+0x0*0000005
+0*0000018 TLSGD c
+0*000001c TLSLDM d
+0*0000020 TLSGD e
+0*0000024 TLSLDM f
+0*0000028 GOTDTPREL g
+0*000002c DTPRELHI h
+0*0000030 DTPRELLO i
+0*0000034 DTPREL16 j
+0*0000038 GOTTPREL k
+0*000003c TPRELHI l
+0*0000040 TPRELLO m
+0*0000044 TPREL16 n
+
+
diff --git a/gas/testsuite/gas/alpha/elf-tls-1.s b/gas/testsuite/gas/alpha/elf-tls-1.s
new file mode 100644
index 0000000..42385d7
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-1.s
@@ -0,0 +1,24 @@
+ .set nomacro
+ ldq $27, __tls_get_addr($29) !literal!1
+ ldq $16, a($29) !tlsgd!1
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
+
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
+ ldq $27, __tls_get_addr($29) !literal!2
+ ldq $16, b($29) !tlsldm!2
+
+ ldq $16, c($29) !tlsgd
+ ldq $16, d($29) !tlsldm
+
+ ldq $16, e($29) !tlsgd!3
+ ldq $16, f($29) !tlsldm!4
+
+ ldq $16, g($29) !gotdtprel
+ ldah $16, h($31) !dtprelhi
+ lda $16, i($16) !dtprello
+ lda $16, j($31) !dtprel
+
+ ldq $16, k($29) !gottprel
+ ldah $16, l($31) !tprelhi
+ lda $16, m($16) !tprello
+ lda $16, n($31) !tprel
diff --git a/gas/testsuite/gas/alpha/elf-tls-2.l b/gas/testsuite/gas/alpha/elf-tls-2.l
new file mode 100644
index 0000000..4fcee79
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-2.l
@@ -0,0 +1,9 @@
+.*: Assembler messages:
+.*:5: Error: too many lituse insns for !lituse_tlsgd!1
+.*:10: Error: too many lituse insns for !lituse_tlsldm!2
+.*:15: Error: too many lituse insns for !lituse_tlsgd!3
+.*:20: Error: too many lituse insns for !lituse_tlsldm!4
+.*:23: Error: duplicate !tlsgd!5
+.*:26: Error: duplicate !tlsldm!6
+.*:29: Error: sequence number in use for !tlsgd!7
+.*:32: Error: sequence number in use for !tlsldm!8
diff --git a/gas/testsuite/gas/alpha/elf-tls-2.s b/gas/testsuite/gas/alpha/elf-tls-2.s
new file mode 100644
index 0000000..214fe3a
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-2.s
@@ -0,0 +1,32 @@
+ .set nomacro
+ ldq $16, c($29) !tlsgd!1
+ ldq $27, __tls_get_addr($29) !literal!1
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
+ jsr $26, ($27), __tls_get_addr !lituse_jsr!1
+
+ ldq $16, d($29) !tlsldm!2
+ ldq $27, __tls_get_addr($29) !literal!2
+ jsr $26, ($27), __tls_get_addr !lituse_jsr!2
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
+
+ ldq $16, g($29) !tlsgd!3
+ ldq $27, __tls_get_addr($29) !literal!3
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!3
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!3
+
+ ldq $16, h($29) !tlsldm!4
+ ldq $27, __tls_get_addr($29) !literal!4
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!4
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!4
+
+ ldq $16, i($29) !tlsgd!5
+ ldq $16, i($29) !tlsgd!5
+
+ ldq $16, j($29) !tlsldm!6
+ ldq $16, j($29) !tlsldm!6
+
+ ldq $16, k($29) !tlsgd!7
+ ldq $16, k($29) !tlsldm!7
+
+ ldq $16, l($29) !tlsldm!8
+ ldq $16, l($29) !tlsgd!8
diff --git a/gas/testsuite/gas/alpha/elf-tls-3.l b/gas/testsuite/gas/alpha/elf-tls-3.l
new file mode 100644
index 0000000..51d93e7
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-3.l
@@ -0,0 +1,7 @@
+.*: Assembler messages:
+.*:3: Error: No !tlsgd!1 was found
+.*:6: Error: No !tlsldm!2 was found
+.*:18: Error: No !tlsldm!5 was found
+.*:22: Error: No !tlsgd!6 was found
+.*:8: Error: too many !literal!3 for !tlsgd
+.*:12: Error: too many !literal!4 for !tlsldm
diff --git a/gas/testsuite/gas/alpha/elf-tls-3.s b/gas/testsuite/gas/alpha/elf-tls-3.s
new file mode 100644
index 0000000..31480da
--- /dev/null
+++ b/gas/testsuite/gas/alpha/elf-tls-3.s
@@ -0,0 +1,22 @@
+ .set nomacro
+ ldq $27, __tls_get_addr($29) !literal!1
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!1
+
+ ldq $27, __tls_get_addr($29) !literal!2
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!2
+
+ ldq $16, a($29) !tlsgd!3
+ ldq $27, __tls_get_addr($29) !literal!3
+ ldq $27, __tls_get_addr($29) !literal!3
+
+ ldq $16, b($29) !tlsldm!4
+ ldq $27, __tls_get_addr($29) !literal!4
+ ldq $27, __tls_get_addr($29) !literal!4
+
+ ldq $16, e($29) !tlsgd!5
+ ldq $27, __tls_get_addr($29) !literal!5
+ jsr $26, ($27), __tls_get_addr !lituse_tlsldm!5
+
+ ldq $16, f($29) !tlsldm!6
+ ldq $27, __tls_get_addr($29) !literal!6
+ jsr $26, ($27), __tls_get_addr !lituse_tlsgd!6