1; RUN: echo ".text.tin" > %t_order_lto.txt 2; RUN: echo ".text._start" >> %t_order_lto.txt 3; RUN: echo ".text.pat" >> %t_order_lto.txt 4; RUN: llvm-as %s -o %t.o 5; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \ 6; RUN: -m elf_x86_64 -o %t.exe %t.o \ 7; RUN: --section-ordering-file=%t_order_lto.txt 8; RUN: llvm-readobj -elf-output-style=GNU -t %t.exe | FileCheck %s 9 10; Check that the order of the sections is tin -> _start -> pat. 11 12; CHECK: 00000000004000d0 1 FUNC LOCAL DEFAULT 1 pat 13; CHECK: 00000000004000b0 1 FUNC LOCAL DEFAULT 1 tin 14; CHECK: 00000000004000c0 15 FUNC GLOBAL DEFAULT 1 _start 15 16target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 17target triple = "x86_64-unknown-linux-gnu" 18 19define void @pat() #0 { 20 ret void 21} 22 23define void @tin() #0 { 24 ret void 25} 26 27define i32 @_start() { 28 call void @pat() 29 call void @tin() 30 ret i32 0 31} 32 33attributes #0 = { noinline optnone } 34