1# REQUIRES: x86 2# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t 3 4# RUN: echo "SECTIONS { .writable : { *(.writable) } }" > %t.script 5# RUN: ld.lld -o %t.out --script %t.script %t 6# RUN: llvm-objdump -section-headers %t.out | \ 7# RUN: FileCheck -check-prefix=TEXTORPHAN %s 8 9# RUN: echo "SECTIONS { .text : { *(.text) } }" > %t.script 10# RUN: ld.lld -o %t.out --script %t.script %t 11# RUN: llvm-objdump -section-headers %t.out | \ 12# RUN: FileCheck -check-prefix=WRITABLEORPHAN %s 13 14# TEXTORPHAN: Sections: 15# TEXTORPHAN-NEXT: Idx Name 16# TEXTORPHAN-NEXT: 0 17# TEXTORPHAN-NEXT: 1 .text 18# TEXTORPHAN-NEXT: 2 .writable 19 20# WRITABLEORPHAN: Sections: 21# WRITABLEORPHAN-NEXT: Idx Name 22# WRITABLEORPHAN-NEXT: 0 23# WRITABLEORPHAN-NEXT: 1 .text 24# WRITABLEORPHAN-NEXT: 2 .writable 25 26.global _start 27_start: 28 nop 29 30.section .writable,"aw" 31 .zero 4 32