brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · a3e06a8 Raw
88 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o %t.obj3# RUN: lld-link %t.obj -opt:noref -guard:cf,nolongjmp -out:%t.exe -entry:main 2>&1 | FileCheck %s --check-prefix=ERRS4# RUN: llvm-readobj --file-headers --coff-load-config %t.exe | FileCheck %s5 6# ERRS: warning: ignoring .gfids$y symbol table index section in object {{.*}}gfids-corrupt{{.*}}7# ERRS: warning: ignoring invalid symbol table index in section .gfids$y in object {{.*}}gfids-corrupt{{.*}}8 9# The table is arbitrary, really.10# CHECK: ImageBase: 0x14000000011# CHECK: LoadConfig [12# CHECK:   SEHandlerTable: 0x013# CHECK:   SEHandlerCount: 014# CHECK:   GuardCFCheckFunction: 0x015# CHECK:   GuardCFCheckDispatch: 0x016# CHECK:   GuardCFFunctionTable: 0x14000{{.*}}17# CHECK:   GuardCFFunctionCount: 218# CHECK:   GuardFlags [ (0x500)19# CHECK:     CF_FUNCTION_TABLE_PRESENT (0x400)20# CHECK:     CF_INSTRUMENTED (0x100)21# CHECK:   ]22# CHECK:   GuardAddressTakenIatEntryTable: 0x023# CHECK:   GuardAddressTakenIatEntryCount: 024# CHECK:   GuardLongJumpTargetTable: 0x025# CHECK:   GuardLongJumpTargetCount: 026# CHECK: ]27# CHECK:      GuardFidTable [28# CHECK-NEXT:   0x14000{{.*}}29# CHECK-NEXT:   0x14000{{.*}}30# CHECK-NEXT: ]31 32 33# Indicate that gfids are present.34        .def     @feat.00; .scl    3; .type   0; .endef35        .globl  @feat.0036@feat.00 = 0x80037 38        .def     f1; .scl    2; .type   32; .endef39        .section        .text,"xr",one_only,f140        .global f141f1:42        movl $42, %eax43        retq44 45        .def     f2; .scl    2; .type   32; .endef46        .section        .text,"xr",one_only,f247        .global f248f2:49        movl $13, %eax50        retq51 52        .section        .data,"dw",one_only,fp153        .globl  fp154fp1:55        .quad   f156 57        .section        .data,"dw",one_only,fp258        .globl  fp259fp2:60        .quad   f261 62        .section        .gfids$y,"dr",associative,fp163        .symidx f164        .byte 065 66        .section        .gfids$y,"dr",associative,fp267        .symidx f268        .long 0x40069 70        .def     main; .scl    2; .type   32; .endef71        .section        .text,"xr",one_only,main72        .globl  main73main:74        callq      *fp1(%rip)75        callq      *fp2(%rip)76        xor %eax, %eax77        retq78 79        .section .rdata,"dr"80.globl _load_config_used81_load_config_used:82        .long 25683        .fill 124, 1, 084        .quad __guard_fids_table85        .quad __guard_fids_count86        .long __guard_flags87        .fill 128, 1, 088