1# REQUIRES: x86
2
3# RUN: echo '.section .text,"ax"; .quad 0' > %t.s
4# RUN: echo '.section .foo,"ax"; .quad 0' >> %t.s
5# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t.o
6# RUN: ld.lld --hash-style=sysv -o %t1 --script %s  \
7# RUN:   %t.o -shared
8# RUN: llvm-readobj -elf-output-style=GNU -l %t1 | FileCheck %s
9
10# CHECK:      Segment Sections...
11# CHECK-NEXT:   00     .text .dynsym .hash .dynstr .dynamic
12# CHECK-NEXT:   01     .bar .foo
13
14PHDRS {
15  ph_write PT_LOAD FLAGS(2);
16  ph_exec  PT_LOAD FLAGS(1);
17}
18
19SECTIONS {
20  .bar : { *(.bar) } : ph_exec
21  .foo : { *(.foo) }
22  .text : { *(.text) } : ph_write
23}
24