1# REQUIRES: x86
2
3## Test we enable data sections for LTO so --symbol-ordering-fils is respected
4## for data symbols.
5
6# RUN: llvm-mc -filetype=obj -triple=x86_64-scei-ps4 %s -o %t.o
7# RUN: llvm-as %p/Inputs/data-ordering-lto.ll -o %t.bc
8
9# RUN: echo "tin  " > %t_order_lto.txt
10# RUN: echo "dipsy " >> %t_order_lto.txt
11# RUN: echo "pat " >> %t_order_lto.txt
12
13# RUN: ld.lld --symbol-ordering-file %t_order_lto.txt %t.o %t.bc -o %t
14# RUN: llvm-nm -v %t | FileCheck %s
15
16# CHECK:      D tin
17# CHECK-NEXT: D dipsy
18# CHECK-NEXT: D pat
19
20.globl _start
21_start:
22  movl $pat, %ecx
23  movl $dipsy, %ebx
24  movl $tin, %eax
25