xref: /llvm-project-15.0.7/lld/test/ELF/linkerscript/non-alloc.s (revision 80bb52ae)
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
3
4# RUN: echo "SECTIONS { .foo 0 : {*(foo)} }" > %t.script
5# RUN: ld.lld --hash-style=sysv -o %t1 --script %t.script %t -shared
6# RUN: llvm-readobj -elf-output-style=GNU -s -l %t1 | 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     .text .dynsym .hash .dynstr
19# CHECK-NEXT:   01     .dynamic
20
21nop
22.section foo
23.quad 0
24

served by {OpenGrok

Last Index Update: Fri May 15 20:09:11 GMT 2026