brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · de7c730 Raw
45 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj3# RUN: lld-link %t.obj -safeseh -out:%t.exe -entry:main4# RUN: llvm-readobj --file-headers %t.exe | FileCheck %s5 6# This object lacks a _load_config_used global, so we set7# IMAGE_DLL_CHARACTERISTICS_NO_SEH even though there is an exception handler.8# This is a more secure default. If someone wants to use a CRT without a load9# config and they want to use 32-bit SEH, they will need to provide a10# safeseh-compatible load config.11 12# CHECK-LABEL: Characteristics [13# CHECK:   IMAGE_DLL_CHARACTERISTICS_NO_SEH14# CHECK: ]15 16# CHECK-LABEL:  DataDirectory {17# CHECK:    LoadConfigTableRVA: 0x018# CHECK:    LoadConfigTableSize: 0x019# CHECK:  }20 21# CHECK-NOT: LoadConfig22# CHECK-NOT: SEHTable23 24        .def     @feat.00;25        .scl    3;26        .type   0;27        .endef28        .globl  @feat.0029@feat.00 = 130 31        .text32        .def     _main; .scl    2; .type   32; .endef33        .globl  _main34_main:35        pushl $_my_handler36        movl $42, %eax37        popl %ecx38        ret39 40        .def     _my_handler; .scl    3; .type   32; .endef41_my_handler:42        ret43 44.safeseh _my_handler45