2 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
3 # RUN: echo "SECTIONS { \
4 # RUN: .text : { *(.text) } \
5 # RUN: . = 0x1000; .aaa : ONLY_IF_RO { *(.aaa.*) } \
6 # RUN: . = 0x2000; .aaa : ONLY_IF_RW { *(.aaa.*) } } " > %t.script
7 # RUN: ld.lld -o %t1 --script %t.script %t
8 # RUN: llvm-objdump --section-headers %t1 | FileCheck %s
11 # CHECK-NEXT: Idx Name Size VMA Type
12 # CHECK: .aaa 00000010 0000000000002000 DATA
15 # RUN: echo "SECTIONS { \
16 # RUN: .text : { *(.text) } \
17 # RUN: . = 0x1000; .aaa : ONLY_IF_RW { *(.aaa.*) } \
18 # RUN: . = 0x2000; .aaa : ONLY_IF_RO { *(.aaa.*) } } " > %t2.script
19 # RUN: ld.lld -o %t2 --script %t2.script %t
20 # RUN: llvm-objdump --section-headers %t2 | FileCheck %s --check-prefix=REV
23 # REV-NEXT: Idx Name Size VMA Type
24 # REV: .aaa 00000010 0000000000001000 DATA