32 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at8.s -o %t.o3# RUN: ld.lld %t.o --script %s -o %t4# RUN: llvm-readelf -S -l %t | FileCheck %s5 6MEMORY {7 FLASH : ORIGIN = 0x08000000, LENGTH = 0x1008 RAM : ORIGIN = 0x20000000, LENGTH = 0x2009}10 11SECTIONS {12 .text : { *(.text) } > FLASH13 .sec1 : { *(.sec1) } > RAM AT > FLASH14 .sec2 : { *(.sec2) } > RAM AT > FLASH15 .sec3 : { *(.sec3) } > RAM AT > FLASH16}17 18# Make sure we do not issue a load-address overlap error19# Previously, .sec3 would overwrite the LMAOffset in the20# PT_LOAD header.21 22# CHECK: Name Type Address Off23# CHECK: .text PROGBITS 0000000008000000 00015824# CHECK: .sec1 PROGBITS 0000000020000000 00100025# CHECK: .sec2 PROGBITS 0000000020000008 00100826# CHECK: .sec3 PROGBITS 0000000020000010 00101027 28# CHECK: Program Headers:29# CHECK: Type Offset VirtAddr PhysAddr30# CHECK-NEXT: LOAD 0x001000 0x0000000020000000 0x000000000800000031# CHECK-NOT: LOAD32