[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / safeseh-notable.s
blobde7c73090cb478ed19814bb8dc51d2cb6ea4a85d
1 # REQUIRES: x86
2 # RUN: llvm-mc -triple i686-windows-msvc %s -filetype=obj -o %t.obj
3 # RUN: lld-link %t.obj -safeseh -out:%t.exe -entry:main
4 # RUN: llvm-readobj --file-headers %t.exe | FileCheck %s
6 # This object lacks a _load_config_used global, so we set
7 # 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 load
9 # config and they want to use 32-bit SEH, they will need to provide a
10 # safeseh-compatible load config.
12 # CHECK-LABEL: Characteristics [
13 # CHECK: IMAGE_DLL_CHARACTERISTICS_NO_SEH
14 # CHECK: ]
16 # CHECK-LABEL: DataDirectory {
17 # CHECK: LoadConfigTableRVA: 0x0
18 # CHECK: LoadConfigTableSize: 0x0
19 # CHECK: }
21 # CHECK-NOT: LoadConfig
22 # CHECK-NOT: SEHTable
24 .def @feat.00;
25 .scl 3;
26 .type 0;
27 .endef
28 .globl @feat.00
29 @feat.00 = 1
31 .text
32 .def _main; .scl 2; .type 32; .endef
33 .globl _main
34 _main:
35 pushl $_my_handler
36 movl $42, %eax
37 popl %ecx
38 ret
40 .def _my_handler; .scl 3; .type 32; .endef
41 _my_handler:
42 ret
44 .safeseh _my_handler