aboutsummaryrefslogtreecommitdiffstats
path: root/test/ELF/tls-offset.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/tls-offset.s')
-rw-r--r--test/ELF/tls-offset.s16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/ELF/tls-offset.s b/test/ELF/tls-offset.s
index ad921af8eff6..062def4e14fc 100644
--- a/test/ELF/tls-offset.s
+++ b/test/ELF/tls-offset.s
@@ -2,7 +2,17 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
// RUN: ld.lld %t -o %tout
// RUN: llvm-readobj -s %tout | FileCheck %s
-
+// RUN: echo "SECTIONS { \
+// RUN: . = 0x201000; \
+// RUN: .text : { *(.text) } \
+// RUN: . = 0x202000; \
+// RUN: .tdata : { *(.tdata) } \
+// RUN: .tbss : { *(.tbss) } \
+// RUN: .data.rel.ro : { *(.data.rel.ro) } \
+// RUN: }" > %t.script
+ // RUN: ld.lld -T %t.script %t -o %tout2
+// RUN: echo SCRIPT
+// RUN: llvm-readobj -s %tout2 | FileCheck %s
.global _start
_start:
retq
@@ -51,6 +61,6 @@ _start:
// CHECK-NEXT: SHF_ALLOC
// CHECK-NEXT: SHF_WRITE
// CHECK-NEXT: ]
-// CHECK-NEXT: Address: 0x202004
-// CHECK-NEXT: Offset: 0x2004
+// CHECK-NEXT: Address: 0x202010
+// CHECK-NEXT: Offset: 0x2010
// CHECK-NEXT: Size: 4