xref: /llvm-project/lld/test/ELF/linkerscript/sections-constraint2.s (revision b159906a9a45ba9d8655a29014d585203faf0629)
1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3# RUN: echo "SECTIONS { zed : ONLY_IF_RO { *(foo) *(bar) } }" > %t.script
4# RUN: ld.lld -T %t.script %t.o -o %t.so -shared
5# RUN: llvm-readobj -S %t.so | FileCheck %s
6
7# CHECK: Sections [
8# CHECK-NOT: zed
9
10.section foo,"aw"
11.quad 1
12
13.section bar, "a"
14.quad 2
15