2 // RUN
: llvm-mc
--triple
=x86_64
-filetype
=obj
%s
-o
%t.o
3 // RUN
: echo
"SECTIONS { \
4 // RUN: . = 0x80000000; \
5 // RUN: .linkorder : { *(.linkorder.*) } \
6 // RUN: .text : { *(.text) } \
7 // RUN: .text.1 0x80000200 : AT(0x1000) { *(.text.1) } \
8 // RUN: .text.2 0x80000100 : AT(0x2000) { *(.text.2) } \
9 // RUN: } " > %t.script
10 // RUN
: ld.lld
--script
%t.script
%t.o
-o
%t
11 // RUN
: llvm-readobj
-x
.linkorder %t | FileCheck %s
13 /// When
a linker script does
not have monotonically increasing addresses
14 /// the SHF_LINK_ORDER sections should still
be in monotonically increasing
17 // CHECK
: Hex dump of section
'.linkorder':
18 // CHECK-NEXT
: 0x80000000 0201
20 .section .text.1, "ax", %progbits
25 .section .text.2, "ax", %progbits
28 .section .linkorder.1, "ao", %progbits, .text.1
31 .section .linkorder.2, "ao", %progbits, .text.2