1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o 3# RUN: echo "SECTIONS { \ 4# RUN: . = SIZEOF_HEADERS; \ 5# RUN: .text : { *(.text) } \ 6# RUN: . = ALIGN(0x1000); \ 7# RUN: .data.rel.ro : { *(.data.rel.ro) } \ 8# RUN: }" > %t.script 9# RUN: ld.lld -o %t -T %t.script %t.o -shared 10# RUN: llvm-readobj -l %t | FileCheck %s 11 12 13# Test that the orphan section foo is placed before the ALIGN and so the second 14# PT_LOAD is aligned. 15 16 17# CHECK: Type: PT_LOAD 18# CHECK-NEXT: Offset: 0x0 19 20# CHECK: Type: PT_LOAD 21# CHECK-NEXT: Offset: 0x1000 22 23nop 24.section .data.rel.ro, "aw" 25.byte 0 26 27.section foo, "ax" 28nop 29