100 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=.xdata 2>&1 \4# RUN: | FileCheck %s --check-prefix=WARN5# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=XDATA6# RUN: lld-link %t.obj -dll -noentry -out:%t.dll7# RUN: llvm-readobj --sections %t.dll | FileCheck %s --check-prefix=RDATA8 9# There shouldn't be much xdata, because all three .pdata entries (12 bytes10# each) should use the same .xdata unwind info.11# XDATA: Name: .rdata12# XDATA-NEXT: VirtualSize: 0x6F13# XDATA: Name: .pdata14# XDATA-NEXT: VirtualSize: 0x2415# XDATA: Name: .xdata16# XDATA-NEXT: VirtualSize: 0x817#18# WARN: warning: .xdata=.rdata: already merged into .xdata19#20# RDATA: Name: .rdata21# RDATA-NEXT: VirtualSize: 0x7822# RDATA: Name: .pdata23# RDATA-NEXT: VirtualSize: 0x2424 25 .text26callee:27 ret28 29 .def xdata1;30 .scl 2;31 .type 32;32 .endef33 .section .text,"xr",one_only,xdata134 .globl xdata1 # -- Begin function xdata135 .p2align 4, 0x9036xdata1: # @xdata137.seh_proc xdata138# BB#0: # %entry39 subq $40, %rsp40 .seh_stackalloc 4041 .seh_endprologue42 callq callee43 nop44 addq $40, %rsp45 jmp callee # TAILCALL46 .seh_handlerdata47 .section .text,"xr",one_only,xdata148 .seh_endproc49 # -- End function50 .def xdata2;51 .scl 2;52 .type 32;53 .endef54 .section .text,"xr",one_only,xdata255 .globl xdata2 # -- Begin function xdata256 .p2align 4, 0x9057xdata2: # @xdata258.seh_proc xdata259# BB#0: # %entry60 subq $40, %rsp61 .seh_stackalloc 4062 .seh_endprologue63 callq callee64 callq callee65 nop66 addq $40, %rsp67 jmp callee # TAILCALL68 .seh_handlerdata69 .section .text,"xr",one_only,xdata270 .seh_endproc71 # -- End function72 .def xdata3;73 .scl 2;74 .type 32;75 .endef76 .section .text,"xr",one_only,xdata377 .globl xdata3 # -- Begin function xdata378 .p2align 4, 0x9079xdata3: # @xdata380.seh_proc xdata381# BB#0: # %entry82 subq $40, %rsp83 .seh_stackalloc 4084 .seh_endprologue85 callq callee86 callq callee87 callq callee88 nop89 addq $40, %rsp90 jmp callee # TAILCALL91 .seh_handlerdata92 .section .text,"xr",one_only,xdata393 .seh_endproc94 # -- End function95 .section .drectve,"yn"96 .ascii " -export:xdata1"97 .ascii " -export:xdata2"98 .ascii " -export:xdata3"99 100