2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at8.s -o %t.o
3 # RUN: ld.lld %t.o --script %s -o %t
4 # RUN: llvm-readelf -S -l %t | FileCheck %s
7 FLASH : ORIGIN = 0x08000000, LENGTH = 0x100
8 RAM : ORIGIN = 0x20000000, LENGTH = 0x200
12 .text : { *(.text) } > FLASH
13 .sec1 : { *(.sec1) } > RAM AT > FLASH
14 .sec2 : { *(.sec2) } > RAM AT > FLASH
15 .sec3 : { *(.sec3) } > RAM AT > FLASH
18 # Make sure we do not issue a load-address overlap error
19 # Previously, .sec3 would overwrite the LMAOffset in the
22 # CHECK: Name Type Address Off
23 # CHECK: .text PROGBITS 0000000008000000 000158
24 # CHECK: .sec1 PROGBITS 0000000020000000 001000
25 # CHECK: .sec2 PROGBITS 0000000020000008 001008
26 # CHECK: .sec3 PROGBITS 0000000020000010 001010
28 # CHECK: Program Headers:
29 # CHECK: Type Offset VirtAddr PhysAddr
30 # CHECK-NEXT: LOAD 0x001000 0x0000000020000000 0x0000000008000000