2 # RUN: llvm-mc %s -triple x86_64-windows-msvc -filetype=obj -o %t.obj
3 # RUN: lld-link %t.obj -dll -noentry -out:%t.dll -merge:.xdata=.xdata 2>&1 \
4 # RUN: | FileCheck %s --check-prefix=WARN
5 # RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=XDATA
6 # RUN: lld-link %t.obj -dll -noentry -out:%t.dll
7 # RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=RDATA
9 # There shouldn't be much xdata, because all three .pdata entries (12 bytes
10 # each) should use the same .xdata unwind info.
12 # XDATA-NEXT: VirtualSize: 0x6F
14 # XDATA-NEXT: VirtualSize: 0x24
16 # XDATA-NEXT: VirtualSize: 0x8
18 # WARN: warning: .xdata=.rdata: already merged into .xdata
21 # RDATA-NEXT: VirtualSize: 0x78
23 # RDATA-NEXT: VirtualSize: 0x24
33 .section .text,"xr",one_only,xdata1
34 .globl xdata1 # -- Begin function xdata1
47 .section .text,"xr",one_only,xdata1
54 .section .text,"xr",one_only,xdata2
55 .globl xdata2 # -- Begin function xdata2
69 .section .text,"xr",one_only,xdata2
76 .section .text,"xr",one_only,xdata3
77 .globl xdata3 # -- Begin function xdata3
92 .section .text,"xr",one_only,xdata3
95 .section .drectve,"yn"
96 .ascii " -export:xdata1"
97 .ascii " -export:xdata2"
98 .ascii " -export:xdata3"