aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/linkerscript/orphan-first-cmd.s
blob: 3fb3b31b9a40d8d3ce97ae335205ba579264fc10 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { \
# RUN:         foo = 123; \
# RUN:         . = 0x1000; \
# RUN:         . = 0x2000; \
# RUN:         .bar : { . = . + 1; } \
# RUN:       }" > %t.script
# RUN: ld.lld -o %t -T %t.script %t.o -shared
# RUN: llvm-readobj -s %t | FileCheck %s

# CHECK:      Name: .text
# CHECK-NEXT: Type: SHT_PROGBITS
# CHECK-NEXT: Flags [
# CHECK-NEXT:   SHF_ALLOC
# CHECK-NEXT:   SHF_EXECINSTR
# CHECK-NEXT: ]
# CHECK-NEXT: Address: 0x1000