summaryrefslogtreecommitdiffstats
path: root/lld/test/ELF/Inputs
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2019-02-06 13:38:10 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2019-02-06 13:38:10 +0000
commitda60ad220ba33decf07fb727bc2b375fc3dae85f (patch)
tree36edd88febed03a80b895fbf7334ec123d18c536 /lld/test/ELF/Inputs
parent5a6712b633478adac1c1d95003af7c9ba5f9fee6 (diff)
downloadbcm5719-llvm-da60ad220ba33decf07fb727bc2b375fc3dae85f.tar.gz
bcm5719-llvm-da60ad220ba33decf07fb727bc2b375fc3dae85f.zip
[LLD][ELF] - Set DF_STATIC_TLS flag for i386 target.
DF_STATIC_TLS flag indicates that the shared object or executable contains code using a static thread-local storage scheme. Patch checks if IE/LE relocations were used to check if the code uses a static model. If so it sets the DF_STATIC_TLS flag. Differential revision: https://reviews.llvm.org/D57749 llvm-svn: 353293
Diffstat (limited to 'lld/test/ELF/Inputs')
-rw-r--r--lld/test/ELF/Inputs/i386-static-tls-model1.s9
-rw-r--r--lld/test/ELF/Inputs/i386-static-tls-model2.s9
-rw-r--r--lld/test/ELF/Inputs/i386-static-tls-model3.s9
-rw-r--r--lld/test/ELF/Inputs/i386-static-tls-model4.s9
4 files changed, 36 insertions, 0 deletions
diff --git a/lld/test/ELF/Inputs/i386-static-tls-model1.s b/lld/test/ELF/Inputs/i386-static-tls-model1.s
new file mode 100644
index 00000000000..d287fb64eee
--- /dev/null
+++ b/lld/test/ELF/Inputs/i386-static-tls-model1.s
@@ -0,0 +1,9 @@
+.section ".tdata", "awT", @progbits
+.globl var
+var:
+
+.section .foo, "aw"
+.global _start
+_start:
+ movl $var@tpoff, %edx # R_386_TLS_LE_32
+ movl %gs:0, %ecx
diff --git a/lld/test/ELF/Inputs/i386-static-tls-model2.s b/lld/test/ELF/Inputs/i386-static-tls-model2.s
new file mode 100644
index 00000000000..2c01cee42dd
--- /dev/null
+++ b/lld/test/ELF/Inputs/i386-static-tls-model2.s
@@ -0,0 +1,9 @@
+.section ".tdata", "awT", @progbits
+.globl var
+var:
+
+.section .foo, "aw"
+.global _start
+_start:
+ movl %gs:0, %eax
+ addl var@gotntpoff(%ebx), %eax # R_386_TLS_GOTIE
diff --git a/lld/test/ELF/Inputs/i386-static-tls-model3.s b/lld/test/ELF/Inputs/i386-static-tls-model3.s
new file mode 100644
index 00000000000..fd18fceb71c
--- /dev/null
+++ b/lld/test/ELF/Inputs/i386-static-tls-model3.s
@@ -0,0 +1,9 @@
+.section ".tdata", "awT", @progbits
+.globl var
+var:
+
+.section .foo, "aw"
+.global _start
+_start:
+ movl %gs:0, %eax
+ addl var@indntpoff, %eax # R_386_TLS_IE
diff --git a/lld/test/ELF/Inputs/i386-static-tls-model4.s b/lld/test/ELF/Inputs/i386-static-tls-model4.s
new file mode 100644
index 00000000000..6006518bfd7
--- /dev/null
+++ b/lld/test/ELF/Inputs/i386-static-tls-model4.s
@@ -0,0 +1,9 @@
+.section ".tdata", "awT", @progbits
+.globl var
+var:
+
+.section .foo, "aw"
+.global _start
+_start:
+ movl %gs:0, %eax
+ leal var@ntpoff(%eax), %eax # R_386_TLS_LE
OpenPOWER on IntegriCloud