[lld] d4e2e28 - [ELF][test] Add test coverage of TLS to gc-sections.s

Andrew Ng via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 27 04:30:12 PDT 2020


Author: Andrew Ng
Date: 2020-08-27T12:28:51+01:00
New Revision: d4e2e2852affa5d49eeac37d47bd108ff7a5f181

URL: https://github.com/llvm/llvm-project/commit/d4e2e2852affa5d49eeac37d47bd108ff7a5f181
DIFF: https://github.com/llvm/llvm-project/commit/d4e2e2852affa5d49eeac37d47bd108ff7a5f181.diff

LOG: [ELF][test] Add test coverage of TLS to gc-sections.s

Differential Revision: https://reviews.llvm.org/D86639

Added: 
    

Modified: 
    lld/test/ELF/gc-sections.s

Removed: 
    


################################################################################
diff  --git a/lld/test/ELF/gc-sections.s b/lld/test/ELF/gc-sections.s
index b7f9b3db1820..a98696d41a00 100644
--- a/lld/test/ELF/gc-sections.s
+++ b/lld/test/ELF/gc-sections.s
@@ -12,6 +12,8 @@
 # NOGC: Name: .text
 # NOGC: Name: .init
 # NOGC: Name: .fini
+# NOGC: Name: .tdata
+# NOGC: Name: .tbss
 # NOGC: Name: .ctors
 # NOGC: Name: .dtors
 # NOGC: Name: .debug_pubtypes
@@ -19,6 +21,10 @@
 # NOGC: Name: a
 # NOGC: Name: b
 # NOGC: Name: c
+# NOGC: Name: e
+# NOGC: Name: f
+# NOGC: Name: g
+# NOGC: Name: h
 # NOGC: Name: x
 # NOGC: Name: y
 # NOGC: Name: d
@@ -27,6 +33,8 @@
 # GC1:     Name: .text
 # GC1:     Name: .init
 # GC1:     Name: .fini
+# GC1:     Name: .tdata
+# GC1:     Name: .tbss
 # GC1:     Name: .ctors
 # GC1:     Name: .dtors
 # GC1:     Name: .debug_pubtypes
@@ -34,6 +42,10 @@
 # GC1:     Name: a
 # GC1:     Name: b
 # GC1:     Name: c
+# GC1:     Name: e
+# GC1-NOT: Name: f
+# GC1:     Name: g
+# GC1-NOT: Name: h
 # GC1-NOT: Name: x
 # GC1-NOT: Name: y
 # GC1-NOT: Name: d
@@ -42,6 +54,8 @@
 # GC2:     Name: .text
 # GC2:     Name: .init
 # GC2:     Name: .fini
+# GC2:     Name: .tdata
+# GC2:     Name: .tbss
 # GC2:     Name: .ctors
 # GC2:     Name: .dtors
 # GC2:     Name: .debug_pubtypes
@@ -49,12 +63,16 @@
 # GC2:     Name: a
 # GC2:     Name: b
 # GC2:     Name: c
+# GC2:     Name: e
+# GC2-NOT: Name: f
+# GC2:     Name: g
+# GC2-NOT: Name: h
 # GC2-NOT: Name: x
 # GC2-NOT: Name: y
 # GC2:     Name: d
 
 .globl _start, d
-.protected a, b, c, x, y
+.protected a, b, c, e, f, g, h, x, y
 _start:
   call a
 
@@ -65,11 +83,12 @@ a:
 
 .section .text.b,"ax", at progbits
 b:
+  leaq e at tpoff(%rax),%rdx
   call c
 
 .section .text.c,"ax", at progbits
 c:
-  nop
+  leaq g at tpoff(%rax),%rdx
 
 .section .text.d,"ax", at progbits
 d:
@@ -83,6 +102,22 @@ x:
 y:
   call x
 
+.section .tbss.e,"awT", at nobits
+e:
+  .quad 0
+
+.section .tbss.f,"awT", at nobits
+f:
+  .quad 0
+
+.section .tdata.g,"awT", at progbits
+g:
+  .quad 0
+
+.section .tdata.h,"awT", at progbits
+h:
+  .quad 0
+
 .section .ctors,"aw", at progbits
   .quad 0
 


        


More information about the llvm-commits mailing list