99 lines · plain
1# REQUIRES: x862# RUN: llvm-mc %s -triple x86_64-windows-msvc -filetype=obj -o %t.obj3# RUN: lld-link %t.obj -dll -noentry -out:%t.dll -merge:.xdata=.xdata4# RUN: llvm-readobj --sections --coff-exports %t.dll | FileCheck %s5 6# CHECK: Name: .pdata7# CHECK-NEXT: VirtualSize: 0x188# CHECK: Name: .xdata9# CHECK-NEXT: VirtualSize: 0x1010 11# CHECK: Name: xdata112# CHECK-NEXT: RVA: 0x101013# CHECK: Name: xdata1a14# CHECK-NEXT: RVA: 0x101015# CHECK: Name: xdata1b16# CHECK-NEXT: RVA: 0x103017 18 .text19callee:20 ret21 22 .def xdata1;23 .scl 2;24 .type 32;25 .endef26 .section .text,"xr",one_only,xdata127 .globl xdata1 # -- Begin function xdata128 .p2align 4, 0x9029xdata1: # @xdata130.seh_proc xdata131# BB#0: # %entry32 subq $40, %rsp33 .seh_stackalloc 4034 .seh_endprologue35 callq callee36 nop37 addq $40, %rsp38 jmp callee # TAILCALL39 .seh_handlerdata40 .section .text,"xr",one_only,xdata141 .seh_endproc42 # -- End function43 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.46 .def xdata1a;47 .scl 2;48 .type 32;49 .endef50 .section .text,"xr",one_only,xdata1a51 .globl xdata1a # -- Begin function xdata1a52 .p2align 4, 0x9053xdata1a: # @xdata1a54.seh_proc xdata1a55# BB#0: # %entry56 subq $40, %rsp57 .seh_stackalloc 4058 .seh_endprologue59 callq callee60 nop61 addq $40, %rsp62 jmp callee # TAILCALL63 .seh_handlerdata64 .section .text,"xr",one_only,xdata1a65 .seh_endproc66 67 .section .debug$S,"r",associative,xdata1a68 .section .gfids$y,"r",associative,xdata1a69 .section .gljmp$y,"r",associative,xdata1a70 71# xdata1b's text is identical to xdata1, but its xdata specifies a different72# stack size, so it cannot be ICFd with xdata1.73 .def xdata1b;74 .scl 2;75 .type 32;76 .endef77 .section .text,"xr",one_only,xdata1b78 .globl xdata1b # -- Begin function xdata1b79 .p2align 4, 0x9080xdata1b: # @xdata1b81.seh_proc xdata1b82# BB#0: # %entry83 subq $40, %rsp84 .seh_stackalloc 4885 .seh_endprologue86 callq callee87 nop88 addq $40, %rsp89 jmp callee # TAILCALL90 .seh_handlerdata91 .section .text,"xr",one_only,xdata1b92 .seh_endproc93 # -- End function94 95 .section .drectve,"yn"96 .ascii " -export:xdata1"97 .ascii " -export:xdata1a"98 .ascii " -export:xdata1b"99