1# REQUIRES: x86 2# RUN: echo '.section .foo,"a"; .quad 0; .section .zed,"aM",@progbits,1; .byte 0' > %t.s 3# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t.s -o %t.o 4 5MEMORY { 6 ram (rwx): org = 0x1, len = 96K 7} 8 9SECTIONS { 10 .foo : ALIGN(8) { 11 *(.foo) 12 } > ram 13 14 .zed : { 15 *(.zed) 16 } > ram 17} 18 19# RUN: ld.lld %t.o -o %t --script %s 20# RUN: llvm-readobj --sections %t | FileCheck %s 21 22# CHECK: Name: .foo 23# CHECK-NEXT: Type: SHT_PROGBITS 24# CHECK-NEXT: Flags [ 25# CHECK-NEXT: SHF_ALLOC 26# CHECK-NEXT: ] 27# CHECK-NEXT: Address: 0x8 28# CHECK-NEXT: Offset: 0x1008 29# CHECK-NEXT: Size: 8 30 31# CHECK: Name: .zed 32# CHECK-NEXT: Type: SHT_PROGBITS 33# CHECK-NEXT: Flags [ 34# CHECK-NEXT: SHF_ALLOC 35# CHECK-NEXT: SHF_MERGE 36# CHECK-NEXT: ] 37# CHECK-NEXT: Address: 0x10 38# CHECK-NEXT: Offset: 0x1010 39# CHECK-NEXT: Size: 1 40 41# CHECK: Name: .text 42# CHECK-NEXT: Type: SHT_PROGBITS 43# CHECK-NEXT: Flags [ 44# CHECK-NEXT: SHF_ALLOC 45# CHECK-NEXT: SHF_EXECINSTR 46# CHECK-NEXT: ] 47# CHECK-NEXT: Address: 0x14 48# CHECK-NEXT: Offset: 0x1014 49# CHECK-NEXT: Size: 0 50 51# CHECK: Name: .comment 52# CHECK-NEXT: Type: SHT_PROGBITS 53# CHECK-NEXT: Flags [ 54# CHECK-NEXT: SHF_MERGE 55# CHECK-NEXT: SHF_STRINGS 56# CHECK-NEXT: ] 57# CHECK-NEXT: Address: 0x0 58# CHECK-NEXT: Offset: 0x1014 59# CHECK-NEXT: Size: 8 60