Fix and add tests for all cases in x86 and x86_64 where gnu as implicitly
[llvm.git] / test / MC / ELF / tls-i386.s
blob459d4cc69df9b16ea68a69eda67ab1eaa1db8990
1 // RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | elf-dump | FileCheck %s
3 // Test that all symbols are of type STT_TLS.
5 movl foo1@NTPOFF(%eax), %eax
6 movl foo2@GOTNTPOFF(%eax), %eax
7 movl foo3@TLSGD(%eax), %eax
8 movl foo4@TLSLDM(%eax), %eax
9 movl foo5@TPOFF(%eax), %eax
10 movl foo6@DTPOFF(%eax), %eax
12 // CHECK: (('st_name', 0x00000001) # 'foo1'
13 // CHECK-NEXT: ('st_value', 0x00000000)
14 // CHECK-NEXT: ('st_size', 0x00000000)
15 // CHECK-NEXT: ('st_bind', 0x00000001)
16 // CHECK-NEXT: ('st_type', 0x00000006)
17 // CHECK-NEXT: ('st_other', 0x00000000)
18 // CHECK-NEXT: ('st_shndx', 0x00000000)
19 // CHECK-NEXT: ),
20 // CHECK-NEXT: # Symbol 0x00000006
21 // CHECK-NEXT: (('st_name', 0x00000006) # 'foo2'
22 // CHECK-NEXT: ('st_value', 0x00000000)
23 // CHECK-NEXT: ('st_size', 0x00000000)
24 // CHECK-NEXT: ('st_bind', 0x00000001)
25 // CHECK-NEXT: ('st_type', 0x00000006)
26 // CHECK-NEXT: ('st_other', 0x00000000)
27 // CHECK-NEXT: ('st_shndx', 0x00000000)
28 // CHECK-NEXT: ),
29 // CHECK-NEXT: # Symbol 0x00000007
30 // CHECK-NEXT: (('st_name', 0x0000000b) # 'foo3'
31 // CHECK-NEXT: ('st_value', 0x00000000)
32 // CHECK-NEXT: ('st_size', 0x00000000)
33 // CHECK-NEXT: ('st_bind', 0x00000001)
34 // CHECK-NEXT: ('st_type', 0x00000006)
35 // CHECK-NEXT: ('st_other', 0x00000000)
36 // CHECK-NEXT: ('st_shndx', 0x00000000)
37 // CHECK-NEXT: ),
38 // CHECK-NEXT: # Symbol 0x00000008
39 // CHECK-NEXT: (('st_name', 0x00000010) # 'foo4'
40 // CHECK-NEXT: ('st_value', 0x00000000)
41 // CHECK-NEXT: ('st_size', 0x00000000)
42 // CHECK-NEXT: ('st_bind', 0x00000001)
43 // CHECK-NEXT: ('st_type', 0x00000006)
44 // CHECK-NEXT: ('st_other', 0x00000000)
45 // CHECK-NEXT: ('st_shndx', 0x00000000)
46 // CHECK-NEXT: ),
47 // CHECK-NEXT: # Symbol 0x00000009
48 // CHECK-NEXT: (('st_name', 0x00000015) # 'foo5'
49 // CHECK-NEXT: ('st_value', 0x00000000)
50 // CHECK-NEXT: ('st_size', 0x00000000)
51 // CHECK-NEXT: ('st_bind', 0x00000001)
52 // CHECK-NEXT: ('st_type', 0x00000006)
53 // CHECK-NEXT: ('st_other', 0x00000000)
54 // CHECK-NEXT: ('st_shndx', 0x00000000)
55 // CHECK-NEXT: ),
56 // CHECK-NEXT: # Symbol 0x0000000a
57 // CHECK-NEXT: (('st_name', 0x0000001a) # 'foo6'
58 // CHECK-NEXT: ('st_value', 0x00000000)
59 // CHECK-NEXT: ('st_size', 0x00000000)
60 // CHECK-NEXT: ('st_bind', 0x00000001)
61 // CHECK-NEXT: ('st_type', 0x00000006)
62 // CHECK-NEXT: ('st_other', 0x00000000)
63 // CHECK-NEXT: ('st_shndx', 0x00000000)
64 // CHECK-NEXT: ),