]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/linkerscript/memory5.test
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / linkerscript / memory5.test
1 # REQUIRES: x86
2 # RUN: echo ".section .text,\"ax\"; nop; .section .data,\"aw\"; nop;" \
3 # RUN:   | llvm-mc -filetype=obj -triple=x86_64-pc-linux - -o %t.o
4 # RUN: ld.lld -o %t.so --script %s %t.o
5 # RUN: llvm-objdump -section-headers %t.so | FileCheck %s
6
7 # CHECK:      1 .text         00000001 0000000000042000
8 # CHECK-NEXT: 2 .data         00000001 0000000000044001
9
10 ## Test that assign to Dot changes the position in a memory region.
11
12 MEMORY {
13   ram (wxa) : ORIGIN = 0x42000, LENGTH = 0x100000
14 }
15 SECTIONS {
16   .text : { *(.text*) }
17   . += 0x2000;
18   .data : { *(.data*) }
19 }