49 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 -merge:.xdata=.xdata -verbose 2>&1 | FileCheck %s4# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=XDATA5 6# Test xdata can be merged when text and pdata differ. This test is structured7# so that xdata comes after pdata, which makes xdata come before pdata in the8# assocChildren linked list.9 10# CHECK: ICF needed {{.*}} iterations11# CHECK: Selected12# CHECK: Removed13 14# XDATA: Name: .xdata15# XDATA-NEXT: VirtualSize: 0x416 17 .section .text,"xr",discard,foo18 .globl foo19foo:20 pushq %rax21 popq %rax22 retq23 24.section .pdata,"r",associative,foo25.long foo26.long 527.long foo_xdata@IMGREL28 29 30.section .xdata,"r",associative,foo31foo_xdata:32.long 4233 34 .section .text,"xr",discard,bar35 .globl bar36bar:37 pushq %rcx38 popq %rcx39 retq40 41.section .pdata,"r",associative,bar42.long bar43.long 544.long bar_xdata@IMGREL45 46.section .xdata,"r",associative,bar47bar_xdata:48.long 4249