Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / symbol-ordering-file-icf.s
blob82cf8211b7337d0cb4ba4466d402ff111feacfec
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
3 # RUN: echo "zed" > %t.order
4 # RUN: echo "bar" >> %t.order
5 # RUN: echo "foo" >> %t.order
6 # RUN: ld.lld --icf=all --symbol-ordering-file %t.order -shared %t.o -o %t.so
7 # RUN: llvm-nm %t.so | FileCheck %s
9 ## Check that after ICF merges 'foo' and 'zed' we still
10 ## place them before 'bar', in according to ordering file.
11 # CHECK-DAG: 0000000000001288 T foo
12 # CHECK-DAG: 0000000000001288 T zed
13 # CHECK-DAG: 000000000000128c T bar
15 .section .text.foo,"ax",@progbits
16 .align 4
17 .global foo
18 foo:
19 retq
21 .section .text.bar,"ax",@progbits
22 .align 4
23 .global bar
24 bar:
25 nop
26 retq
28 .section .text.zed,"ax",@progbits
29 .align 4
30 .global zed
31 zed:
32 retq