2 # RUN: grep -B99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t1.obj
3 # RUN: grep -A99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t2.obj
4 # RUN: lld-link %t1.obj %t2.obj -guard:cf,nolongjmp -out:%t.exe -entry:main -opt:noref
5 # RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s
7 # CHECK: ImageBase: 0x140000000
9 # CHECK: SEHandlerTable: 0x0
10 # CHECK: SEHandlerCount: 0
11 # CHECK: GuardCFCheckFunction: 0x0
12 # CHECK: GuardCFCheckDispatch: 0x0
13 # CHECK: GuardCFFunctionTable: 0x14000{{.*}}
14 # CHECK: GuardCFFunctionCount: 3
15 # CHECK: GuardFlags [ (0x500)
16 # CHECK: CF_FUNCTION_TABLE_PRESENT (0x400)
17 # CHECK: CF_INSTRUMENTED (0x100)
19 # CHECK: GuardAddressTakenIatEntryTable: 0x0
20 # CHECK: GuardAddressTakenIatEntryCount: 0
21 # CHECK: GuardLongJumpTargetTable: 0x0
22 # CHECK: GuardLongJumpTargetCount: 0
24 # CHECK: GuardFidTable [
25 # CHECK-NEXT: 0x14000{{.*}}
26 # CHECK-NEXT: 0x14000{{.*}}
27 # CHECK-NEXT: 0x14000{{.*}}
31 # Indicate that no gfids are present. All symbols used by relocations in this
32 # file will be considered address-taken.
33 .def @feat.00; .scl 3; .type 0; .endef
37 .def main; .scl 2; .type 32; .endef
38 .section .text,"xr",one_only,main
48 # Should not appear in gfids table.
49 .def baz; .scl 2; .type 32; .endef
50 .section .text,"xr",one_only,baz
56 .def qux; .scl 2; .type 32; .endef
57 .section .text,"xr",one_only,qux
63 .def quxx; .scl 2; .type 32; .endef
64 .section .text,"xr",one_only,quxx
72 .globl _load_config_used
76 .quad __guard_fids_table
77 .quad __guard_fids_count
83 # Indicate that gfids are present. This file does not take any addresses.
84 .def @feat.00; .scl 3; .type 0; .endef
88 .def foo; .scl 2; .type 32; .endef
89 .section .text,"xr",one_only,foo
95 .def bar; .scl 2; .type 32; .endef
96 .section .text,"xr",one_only,bar