aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/no-space.s
blob: a96797269e43e1977a76b691838466ad7b3a1c7f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o

# RUN: echo "SECTIONS {foo 0 : {*(foo*)} }" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o -shared
# RUN: llvm-readobj -elf-output-style=GNU -l %t | FileCheck %s

# RUN: echo "SECTIONS {foo : {*(foo*)} }" > %t.script
# RUN: ld.lld -o %t --script %t.script %t.o -shared
# RUN: llvm-readobj -elf-output-style=GNU -l %t | FileCheck %s

# There is not enough address space available for the header, so just start the PT_LOAD
# after it.

# CHECK: Program Headers:
# CHECK-NEXT: Type  Offset   VirtAddr           PhysAddr
# CHECK-NEXT: PHDR
# CHECK-NEXT: LOAD  0x001000 0x0000000000000000 0x0000000000000000

# CHECK:      Section to Segment mapping:
# CHECK-NEXT:  Segment Sections...
# CHECK-NEXT:   00
# CHECK-NEXT:   01     foo .text .dynsym .hash .dynstr

.section foo, "a"
.quad 0