1# REQUIRES: x86 2 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t 4# RUN: ld.lld %t -o %t2 --gc-sections -shared 5# RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s 6 7# Non alloca section .bar should not keep section .foo alive. 8 9# CHECK-NOT: Name: .foo 10 11# CHECK: Name: .bar 12# CHECK-NEXT: Type: SHT_PROGBITS 13# CHECK-NEXT: Flags [ 14# CHECK-NEXT: ] 15# CHECK-NEXT: Address: 16# CHECK-NEXT: Offset: 17# CHECK-NEXT: Size: 18# CHECK-NEXT: Link: 19# CHECK-NEXT: Info: 20# CHECK-NEXT: AddressAlignment: 21# CHECK-NEXT: EntrySize: 22# CHECK-NEXT: SectionData ( 23# CHECK-NEXT: 0000: 00000000 00000000 | 24# CHECK-NEXT: ) 25 26 27.section .foo,"a" 28.byte 0 29 30.section .bar 31.quad .foo 32