2 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
3 # RUN: echo "SECTIONS { \
4 # RUN: . = SIZEOF_HEADERS; \
5 # RUN: .keep : { KEEP( INPUT_SECTION_FLAGS(!SHF_WRITE) *(.sec*)) } \
7 # RUN: ld.lld --gc-sections -o %t --script %t.script %t.o
8 # RUN: llvm-readobj --symbols %t | FileCheck %s
10 ## Check that INPUT_SECTION_FLAGS can be used within KEEP, and affects what
13 # CHECK-NOT: NAME: collect