53 lines · plain
1# REQUIRES: x862# RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t.obj3# RUN: lld-link %t.obj -export:foo -export:bar -dll -noentry -out:%t.dll -verbose 2>&1 | FileCheck %s4# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=TEXT5 6# The order of the pdata and xdata sections here shouldn't matter. We should7# still replace bar with foo.8 9# CHECK: ICF needed {{.*}} iterations10# CHECK: Selected foo11# CHECK: Removed bar12 13# We should only have five bytes of text.14# TEXT: Name: .text15# TEXT-NEXT: Size: 0x516 17 .section .text,"xr",discard,foo18 .globl foo19foo:20 pushq %rbx21 pushq %rdi22 popq %rdi23 popq %rbx24 retq25 26 27.section .pdata,"r",associative,foo28.long foo29.long 530.long foo_xdata@IMGREL31 32.section .xdata,"r",associative,foo33foo_xdata:34.long 4235 36 .section .text,"xr",discard,bar37 .globl bar38bar:39 pushq %rbx40 pushq %rdi41 popq %rdi42 popq %rbx43 retq44 45.section .xdata,"r",associative,bar46bar_xdata:47.long 4248 49.section .pdata,"r",associative,bar50.long bar51.long 552.long bar_xdata@IMGREL53