2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
4 # RUN: echo "SECTIONS { .foo 0 : {*(foo)} }" > %t.script
5 # RUN: ld.lld --hash-style=sysv -o %t --script %t.script %t.o -shared
6 # RUN: llvm-readelf -S -l %t | FileCheck %s
8 # Test that we create all necessary PT_LOAD. We use to stop at the first
9 # non-alloc, causing us to not create PT_LOAD for linker generated sections.
11 # CHECK: Program Headers:
13 # CHECK-NEXT: LOAD {{.*}} R
14 # CHECK-NEXT: LOAD {{.*}} R E
15 # CHECK-NEXT: LOAD {{.*}} RW
17 # CHECK: Section to Segment mapping:
18 # CHECK-NEXT: Segment Sections...
19 # CHECK-NEXT: 00 .dynsym .hash .dynstr
20 # CHECK-NEXT: 01 .text
21 # CHECK-NEXT: 02 .dynamic