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 8 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 14 15.section .text.foo,"ax",@progbits 16.align 4 17.global foo 18foo: 19 retq 20 21.section .text.bar,"ax",@progbits 22.align 4 23.global bar 24bar: 25 nop 26 retq 27 28.section .text.zed,"ax",@progbits 29.align 4 30.global zed 31zed: 32 retq 33