1// REQUIRES: x86
2// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/gc-sections-weak.s -o %t2.o
4// RUN: ld.lld %t.o %t2.o -o %t.so -shared --gc-sections
5// RUN: llvm-readobj -S %t.so | FileCheck %s
6
7.global foo
8foo:
9nop
10
11.data
12.global bar1
13bar1:
14.quad foo
15
16// CHECK:      Name: .text
17// CHECK-NEXT: Type: SHT_PROGBITS
18// CHECK-NEXT: Flags [
19// CHECK-NEXT:   SHF_ALLOC
20// CHECK-NEXT:   SHF_EXECINSTR
21// CHECK-NEXT: ]
22// CHECK-NEXT: Address:
23// CHECK-NEXT: Offset:
24// CHECK-NEXT: Size: 1
25