aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/gc-sections-print.s
blob: e05824177c1f334a739e6e55f7084bb7ea453934 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: ld.lld %t --gc-sections --print-gc-sections -o %t2 2>&1 | FileCheck -check-prefix=PRINT %s

# PRINT:      removing unused section from '.text.x' in file
# PRINT-NEXT: removing unused section from '.text.y' in file

# RUN: ld.lld %t --gc-sections --print-gc-sections --no-print-gc-sections -o %t2 >& %t.log
# RUN: echo >> %t.log
# RUN: FileCheck -check-prefix=NOPRINT %s < %t.log

# NOPRINT-NOT: removing

.globl _start
.protected a, x, y
_start:
 call a

.section .text.a,"ax",@progbits
a:
 nop

.section .text.x,"ax",@progbits
x:
 nop

.section .text.y,"ax",@progbits
y:
 nop