2016-11-02 04:11:01 +08:00
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o --gc-sections -shared -o %t1
|
|
|
|
# RUN: ld.lld %t.o -shared -o %t2
|
|
|
|
# RUN: llvm-readobj -symbols %t1 | FileCheck %s --check-prefix=GC
|
|
|
|
# RUN: llvm-readobj -symbols %t2 | FileCheck %s --check-prefix=NOGC
|
|
|
|
|
2017-02-28 17:58:18 +08:00
|
|
|
# NOGC: Symbol {
|
|
|
|
# NOGC: Name: patatino
|
|
|
|
# NOGC-NEXT: Value: 0x1000
|
|
|
|
# NOGC-NEXT: Size: 0
|
|
|
|
# NOGC-NEXT: Binding: Local
|
|
|
|
# NOGC-NEXT: Type: TLS
|
|
|
|
# NOGC-NEXT: Other: 0
|
|
|
|
# NOGC-NEXT: Section: .tbss
|
|
|
|
# NOGC-NEXT: }
|
2016-11-02 04:11:01 +08:00
|
|
|
|
|
|
|
# GC-NOT: tbss
|
|
|
|
|
|
|
|
.section .tbss,"awT",@nobits
|
|
|
|
patatino:
|
|
|
|
.long 0
|
|
|
|
.section .noalloc,""
|
|
|
|
.quad patatino
|