File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
lld/test/ELF/linkerscript Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Test STT_TLS and relocations without PT_TLS. See also invalid/tls-symbol.s.
2
+ # REQUIRES: x86
3
+ # RUN: rm -rf %t && split-file %s %t && cd %t
4
+ # RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
5
+ # RUN: not ld.lld -T a.lds a.o --noinhibit-exec 2>&1 | FileCheck %s --implicit-check-not=warning:
6
+
7
+ # CHECK: error: a.o has an STT_TLS symbol but doesn't have an SHF_TLS section
8
+
9
+ #--- a.lds
10
+ PHDRS {
11
+ text PT_LOAD FLAGS(5);
12
+ data PT_LOAD FLAGS(6);
13
+ }
14
+
15
+ SECTIONS {
16
+ . = SIZEOF_HEADERS;
17
+ .text : { *(.text .text.*) } :text
18
+ .data : { *(.data .data.*) } :data
19
+ }
20
+
21
+ #--- a.s
22
+ .globl _start
23
+ _start:
24
+ movl %fs:a@TPOFF, %eax
25
+ movl %fs:b@TPOFF, %eax
26
+
27
+ .section .tbss,"awT"
28
+ a:
29
+ b:
30
+ .long 0
You can’t perform that action at this time.
0 commit comments