25 lines · plain
1# REQUIRES: x862 3# RUN: echo '.section .text,"ax"; .global _start; nop' > %t.s4# RUN: echo '.section .data,"aw"; .quad 0' >> %t.s5# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o6 7# RUN: rm -rf %t.dir && mkdir -p %t.dir8# RUN: echo "RAM2 (rwx): ORIGIN = 0x3000, LENGTH = 0x100" > %t.dir/inc.script9# RUN: ld.lld -o %t.elf --script %s %t.o -L %t.dir10# RUN: llvm-objdump --section-headers %t.elf | FileCheck %s11# CHECK: .data 00000008 0000000000002000 DATA12# CHECK: .data2 00000008 0000000000003000 DATA13 14MEMORY {15 ROM (rwx): ORIGIN = 0x1000, LENGTH = 0x10016 RAM (rwx): ORIGIN = 0x2000, LENGTH = 0x10017 INCLUDE "inc.script"18}19 20SECTIONS {21 .text : { *(.text*) } > ROM22 .data : { *(.data*) } > RAM23 .data2 : { QUAD(0) } > RAM224}25