diff options
Diffstat (limited to 'lld/test/ELF/linkerscript/implicit-program-header.s')
-rw-r--r-- | lld/test/ELF/linkerscript/implicit-program-header.s | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/lld/test/ELF/linkerscript/implicit-program-header.s b/lld/test/ELF/linkerscript/implicit-program-header.s index 682f2024558..ea5c8738d83 100644 --- a/lld/test/ELF/linkerscript/implicit-program-header.s +++ b/lld/test/ELF/linkerscript/implicit-program-header.s @@ -1,15 +1,9 @@ # REQUIRES: x86 -# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o -# RUN: echo "PHDRS { \ -# RUN: ph_write PT_LOAD FLAGS(2); \ -# RUN: ph_exec PT_LOAD FLAGS(1); \ -# RUN: } \ -# RUN: SECTIONS { \ -# RUN: .bar : { *(.bar) } : ph_exec \ -# RUN: .foo : { *(.foo) } \ -# RUN: .text : { *(.text) } : ph_write \ -# RUN: }" > %t.script -# RUN: ld.lld --hash-style=sysv -o %t1 --script %t.script \ + +# RUN: echo '.section .text,"ax"; .quad 0' > %t.s +# RUN: echo '.section .foo,"ax"; .quad 0' >> %t.s +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t.s -o %t.o +# RUN: ld.lld --hash-style=sysv -o %t1 --script %s \ # RUN: %t.o -shared # RUN: llvm-readobj -elf-output-style=GNU -l %t1 | FileCheck %s @@ -17,6 +11,13 @@ # CHECK-NEXT: 00 .text .dynsym .hash .dynstr .dynamic # CHECK-NEXT: 01 .bar .foo -.quad 0 -.section .foo,"ax" -.quad 0 +PHDRS { + ph_write PT_LOAD FLAGS(2); + ph_exec PT_LOAD FLAGS(1); +} + +SECTIONS { + .bar : { *(.bar) } : ph_exec + .foo : { *(.foo) } + .text : { *(.text) } : ph_write +} |