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
4 # RUN: llvm-readobj --sections --coff-exports %t.dll | FileCheck %s
7 # CHECK-NEXT: VirtualSize: 0x18
9 # CHECK-NEXT: VirtualSize: 0x10
12 # CHECK-NEXT: RVA: 0x1010
13 # CHECK: Name: xdata1a
14 # CHECK-NEXT: RVA: 0x1010
15 # CHECK: Name: xdata1b
16 # CHECK-NEXT: RVA: 0x1030
26 .section .text,"xr",one_only,xdata1
27 .globl xdata1 # -- Begin function xdata1
40 .section .text,"xr",one_only,xdata1
44 # xdata1a is identical to xdata1, so it should be ICFd, and so should its pdata.
45 # It also has associative debug and CFG sections which should be ignored by ICF.
50 .section .text,"xr",one_only,xdata1a
51 .globl xdata1a # -- Begin function xdata1a
64 .section .text,"xr",one_only,xdata1a
67 .section .debug$S,"r",associative,xdata1a
68 .section .gfids$y,"r",associative,xdata1a
69 .section .gljmp$y,"r",associative,xdata1a
71 # xdata1b's text is identical to xdata1, but its xdata specifies a different
72 # stack size, so it cannot be ICFd with xdata1.
77 .section .text,"xr",one_only,xdata1b
78 .globl xdata1b # -- Begin function xdata1b
91 .section .text,"xr",one_only,xdata1b
95 .section .drectve,"yn"
96 .ascii " -export:xdata1"
97 .ascii " -export:xdata1a"
98 .ascii " -export:xdata1b"