2 # RUN: llvm-mc %s -filetype=obj -triple=x86_64-windows-msvc -o %t.obj
3 # RUN: lld-link %t.obj -export:foo -export:bar -dll -noentry -out:%t.dll -merge:.xdata=.xdata -verbose 2>&1 | FileCheck %s
4 # RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=XDATA
6 # Test xdata can be merged when text and pdata differ. This test is structured
7 # so that xdata comes after pdata, which makes xdata come before pdata in the
8 # assocChildren linked list.
10 # CHECK: ICF needed {{.*}} iterations
15 # XDATA-NEXT: VirtualSize: 0x4
17 .section .text,"xr",discard,foo
24 .section .pdata,"r",associative,foo
27 .long foo_xdata@IMGREL
30 .section .xdata,"r",associative,foo
34 .section .text,"xr",discard,bar
41 .section .pdata,"r",associative,bar
44 .long bar_xdata@IMGREL
46 .section .xdata,"r",associative,bar