summaryrefslogtreecommitdiff
path: root/test/ELF/i386-tls-initial-exec-local.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/i386-tls-initial-exec-local.s')
-rw-r--r--test/ELF/i386-tls-initial-exec-local.s36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/ELF/i386-tls-initial-exec-local.s b/test/ELF/i386-tls-initial-exec-local.s
new file mode 100644
index 0000000000000..dd7de7b431e52
--- /dev/null
+++ b/test/ELF/i386-tls-initial-exec-local.s
@@ -0,0 +1,36 @@
+# REQUIRES: x86
+# RUN: llvm-mc %s -o %t.o -filetype=obj -triple=i386-pc-linux
+# RUN: ld.lld %t.o -o %t.so -shared
+# RUN: llvm-readobj --relocations --sections --section-data %t.so | FileCheck %s
+
+# Check initial exec access to a local symbol.
+
+# CHECK: Name: .got (
+# CHECK-NEXT: Type:
+# CHECK-NEXT: Flags [
+# CHECK-NEXT: SHF_ALLOC
+# CHECK-NEXT: SHF_WRITE
+# CHECK-NEXT: ]
+# CHECK-NEXT: Address:
+# CHECK-NEXT: Offset:
+# CHECK-NEXT: Size: 8
+# CHECK-NEXT: Link:
+# CHECK-NEXT: Info:
+# CHECK-NEXT: AddressAlignment:
+# CHECK-NEXT: EntrySize:
+# CHECK-NEXT: SectionData (
+# CHECK-NEXT: 0000: 00000000 04000000
+# CHECK-NEXT: )
+
+# CHECK: R_386_TLS_TPOFF - 0x0
+# CHECK-NEXT: R_386_TLS_TPOFF - 0x0
+
+ movl bar1@GOTNTPOFF(%eax), %ecx
+ movl bar2@GOTNTPOFF(%eax), %eax
+
+ .section .tdata,"awT",@progbits
+bar1:
+ .long 42
+
+bar2:
+ .long 42