33 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3# RUN: echo "zed" > %t.order4# RUN: echo "bar" >> %t.order5# RUN: echo "foo" >> %t.order6# RUN: ld.lld --icf=all --symbol-ordering-file %t.order -shared %t.o -o %t.so7# RUN: llvm-nm %t.so | FileCheck %s8 9## Check that after ICF merges 'foo' and 'zed' we still10## place them before 'bar', in according to ordering file.11# CHECK-DAG: 0000000000001288 T foo12# CHECK-DAG: 0000000000001288 T zed13# CHECK-DAG: 000000000000128c T bar14 15.section .text.foo,"ax",@progbits16.align 417.global foo18foo:19 retq20 21.section .text.bar,"ax",@progbits22.align 423.global bar24bar:25 nop26 retq27 28.section .text.zed,"ax",@progbits29.align 430.global zed31zed:32 retq33