]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/linkerscript/non-alloc.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / linkerscript / non-alloc.s
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3
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
7
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.
10
11 # CHECK: Program Headers:
12 # CHECK-NEXT:  Type
13 # CHECK-NEXT:  LOAD {{.*}} R E
14 # CHECK-NEXT:  LOAD {{.*}} RW
15
16 # CHECK:      Section to Segment mapping:
17 # CHECK-NEXT:  Segment Sections...
18 # CHECK-NEXT:   00     .dynsym .hash .dynstr .text
19 # CHECK-NEXT:   01     .dynamic
20
21 nop
22 .section foo
23 .quad 0