]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/linkerscript/implicit-program-header.test
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / linkerscript / implicit-program-header.test
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 %t.o -shared
7 # RUN: llvm-readelf -l %t1 | FileCheck %s
8
9 # CHECK:      Segment Sections...
10 # CHECK-NEXT:   00     .dynsym .hash .dynstr .bar .foo .text .dynamic
11 # CHECK-NEXT:   01     .bar .foo
12
13 PHDRS {
14   ph_write PT_LOAD FLAGS(2);
15   ph_exec  PT_LOAD FLAGS(1);
16 }
17
18 SECTIONS {
19   .bar : { *(.bar) } : ph_exec
20   .foo : { *(.foo) }
21   .text : { *(.text) } : ph_write
22 }