1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t 3# RUN: ld.lld %t --gc-sections --print-gc-sections -o %t2 2>&1 | FileCheck -check-prefix=PRINT %s 4 5# PRINT: removing unused section {{.*}}:(.text.x) 6# PRINT-NEXT: removing unused section {{.*}}:(.text.y) 7 8# RUN: ld.lld %t --gc-sections --print-gc-sections --no-print-gc-sections -o %t2 >& %t.log 9# RUN: echo >> %t.log 10# RUN: FileCheck -check-prefix=NOPRINT %s < %t.log 11 12# NOPRINT-NOT: removing 13 14.globl _start 15.protected a, x, y 16_start: 17 call a 18 19.section .text.a,"ax",@progbits 20a: 21 nop 22 23.section .text.x,"ax",@progbits 24x: 25 nop 26 27.section .text.y,"ax",@progbits 28y: 29 nop 30