brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · f70fd0a Raw
48 lines · plain
1# REQUIRES: x862# RUN: mkdir -p %t.dir3# RUN: llvm-mc -triple x86_64-windows-msvc -filetype=obj -o %t.obj %s4# RUN: yaml2obj %p/Inputs/guardcf-align-foobar.yaml \5# RUN:     > %t.dir/guardcf-align-foobar.obj6# RUN: lld-link -out:%t.dir/guardcf-align.exe -entry:main -guard:cf \7# RUN:     %t.obj %t.dir/guardcf-align-foobar.obj8# RUN: llvm-readobj --coff-load-config %t.dir/guardcf-align.exe | FileCheck %s9 10# Check that the gfids table contains at least one entry that ends in 011# and no entries that end in something other than 0.12# CHECK: GuardFidTable [13# CHECK-NOT: 0x{{[0-9A-Fa-f]+[^0]$}}14# CHECK: 0x{{[0-9A-Fa-f]+0$}}15# CHECK-NOT: 0x{{[0-9A-Fa-f]+[^0]$}}16# CHECK: ]17 18# @feat.00 and _load_config_used to indicate we have gfids.19        .def     @feat.00;20        .scl    3;21        .type   0;22        .endef23        .globl  @feat.0024@feat.00 = 0x80125 26        .section .rdata,"dr"27.globl _load_config_used28_load_config_used:29        .long 25630        .fill 124, 1, 031        .quad __guard_fids_table32        .quad __guard_fids_count33        .long __guard_flags34        .fill 128, 1, 035 36# Functions that are called indirectly.37        .section        .gfids$y,"dr"38        .symidx foo39 40 41        .section .text,"rx"42        .global main43main:44        movq foo, %rcx45        xorq %rax, %rax46        callq bar47        retq48