1# REQUIRES: x86
2## In a relocatable link, don't combine SHF_LINK_ORDER and non-SHF_LINK_ORDER
3## like we don't combine SHF_LINK_ORDER with different linked-to sections
4## (see linkerscript/linkorder-linked-to.s).
5## Test we support adding a non-SHF_LINK_ORDER section as an orphan first.
6
7# RUN: llvm-mc -filetype=obj --triple=x86_64 %s -o %t.o
8
9# RUN: ld.lld -r %t.o -o %t.ro
10# RUN: llvm-readelf -x foo %t.ro | FileCheck %s
11
12# CHECK:      Hex dump of section 'foo':
13# CHECK-NEXT: 0x00000000 0100
14
15.section foo,"a"
16.byte 0
17
18.section .text,"ax",@progbits
19ret
20
21.section foo,"ao",@progbits,.text
22.byte 1
23