brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · 50a90c3 Raw
101 lines · plain
1# REQUIRES: x862# RUN: grep -B99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t1.obj3# RUN: grep -A99999 [S]PLITMARKER %s | llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t2.obj4# RUN: lld-link %t1.obj %t2.obj -guard:cf,nolongjmp -out:%t.exe -entry:main -opt:noref5# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s6 7# CHECK: ImageBase: 0x1400000008# CHECK: LoadConfig [9# CHECK:   SEHandlerTable: 0x010# CHECK:   SEHandlerCount: 011# CHECK:   GuardCFCheckFunction: 0x012# CHECK:   GuardCFCheckDispatch: 0x013# CHECK:   GuardCFFunctionTable: 0x14000{{.*}}14# CHECK:   GuardCFFunctionCount: 315# CHECK:   GuardFlags [ (0x500)16# CHECK:     CF_FUNCTION_TABLE_PRESENT (0x400)17# CHECK:     CF_INSTRUMENTED (0x100)18# CHECK:   ]19# CHECK:   GuardAddressTakenIatEntryTable: 0x020# CHECK:   GuardAddressTakenIatEntryCount: 021# CHECK:   GuardLongJumpTargetTable: 0x022# CHECK:   GuardLongJumpTargetCount: 023# CHECK: ]24# CHECK:      GuardFidTable [25# CHECK-NEXT:   0x14000{{.*}}26# CHECK-NEXT:   0x14000{{.*}}27# CHECK-NEXT:   0x14000{{.*}}28# CHECK-NEXT: ]29 30 31# Indicate that no gfids are present. All symbols used by relocations in this32# file will be considered address-taken.33        .def     @feat.00; .scl    3; .type   0; .endef34        .globl  @feat.0035@feat.00 = 036 37        .def     main; .scl    2; .type   32; .endef38        .section        .text,"xr",one_only,main39        .globl  main40main:41        subq $8, %rsp42        leaq foo(%rip), %rdx43        callq bar44        movl $0, %eax45        addq $8, %rsp46        retq47 48# Should not appear in gfids table.49        .def     baz; .scl    2; .type   32; .endef50        .section        .text,"xr",one_only,baz51        .globl  baz52baz:53        mov $1, %eax54        retq55 56        .def     qux; .scl    2; .type   32; .endef57        .section        .text,"xr",one_only,qux58        .globl  qux59qux:60        mov $2, %eax61        retq62 63        .def     quxx; .scl    2; .type   32; .endef64        .section        .text,"xr",one_only,quxx65        .globl  quxx66quxx:67        mov $3, %eax68        retq69 70# Load config.71        .section .rdata,"dr"72.globl _load_config_used73_load_config_used:74        .long 25675        .fill 124, 1, 076        .quad __guard_fids_table77        .quad __guard_fids_count78        .long __guard_flags79        .fill 128, 1, 080 81# SPLITMARKER82 83# Indicate that gfids are present. This file does not take any addresses.84        .def     @feat.00; .scl    3; .type   0; .endef85        .globl  @feat.0086@feat.00 = 0x80087 88        .def     foo; .scl    2; .type   32; .endef89        .section        .text,"xr",one_only,foo90        .global foo91foo:92        movl $42, %eax93        retq94 95        .def     bar; .scl    2; .type   32; .endef96        .section        .text,"xr",one_only,bar97        .global bar98bar:99        movl $13, %eax100        retq101