1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/at3.s -o %t.o 3# RUN: ld.lld %t.o --script %s -o %t 4# RUN: llvm-readelf -sections -program-headers %t | FileCheck %s 5 6MEMORY { 7 FOO (ax) : ORIGIN = 0x1000, LENGTH = 0x100 8 BAR (ax) : ORIGIN = 0x2000, LENGTH = 0x100 9 ZED (ax) : ORIGIN = 0x3000, LENGTH = 0x100 10 FLASH (ax) : ORIGIN = 0x6000, LENGTH = 0x200 11} 12 13SECTIONS { 14 .foo1 : { *(.foo1) } > FOO AT>FLASH 15 .foo2 : { *(.foo2) BYTE(0x42) } > BAR AT>FLASH 16 .foo3 : { *(.foo3) } > ZED AT>FLASH 17} 18 19# CHECK: .foo1 PROGBITS 0000000000001000 001000 20# CHECK: .foo2 PROGBITS 0000000000002000 002000 21# CHECK: .foo3 PROGBITS 0000000000003000 003000 22 23# CHECK: Program Headers: 24# CHECK-NOT: LOAD 25 26# CHECK: Type Offset VirtAddr PhysAddr 27# CHECK-NEXT: LOAD 0x001000 0x0000000000001000 0x0000000000006000 28# CHECK-NEXT: LOAD 0x002000 0x0000000000002000 0x0000000000006008 29# CHECK-NEXT: LOAD 0x003000 0x0000000000003000 0x0000000000006011 30 31# CHECK-NOT: LOAD 32