1# REQUIRES: x86 2# RUN: echo 'nop; .data; nop' | llvm-mc -filetype=obj -triple=x86_64 - -o %t.o 3# RUN: ld.lld -o %t.so --script %s %t.o 4# RUN: llvm-readelf -S %t.so | FileCheck %s 5 6# CHECK: [ 1] .text PROGBITS 0000000000042000 001000 000001 7# CHECK-NEXT: [ 2] .data PROGBITS 0000000000042400 001400 000001 8 9## Test that address expressions changes the position in a memory region. 10 11MEMORY { 12 ram (wxa) : ORIGIN = 0x42000, LENGTH = 0x100000 13} 14SECTIONS { 15 .text : { *(.text*) } 16 data_addr = ALIGN(1024); 17 .data data_addr : { *(.data*) } 18} 19