2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
4 ## When a TLS section is discarded, we will resolve the relocation in a non-SHF_ALLOC
5 ## section to the addend. Technically, we can emit an error in this case as the
6 ## relocation type is not TLS.
7 # RUN: ld.lld %t.o --gc-sections -o %t
8 # RUN: llvm-readelf -x .noalloc %t | FileCheck %s
10 # RUN: echo '.section .tbss,"awT"; .globl root; root: .long 0' | \
11 # RUN: llvm-mc -filetype=obj -triple=x86_64 - -o %t1.o
12 # RUN: ld.lld --gc-sections -u root %t.o %t1.o -o %t
13 # RUN: llvm-readelf -x .noalloc %t | FileCheck %s
15 # CHECK: Hex dump of section '.noalloc':
16 # CHECK-NEXT: 0x00000000 00800000 00000000
21 .section .tbss,"awT",@nobits