mirror of
https://github.com/reactos/reactos.git
synced 2025-06-26 02:29:43 +00:00
[VCRUNTIME][VCSTARTUP] Add separate vcruntime and vcstartup lib
vcruntime contains the code that is linked into ucrtbase (in VS it is also provided as vcruntime140.dll) vcstartup contains the code that is statically linked into executables that link to ucrtbase.dll. In Visual Studio this is part of msvcrt.lib (the import library for msvcrt), similar to our current msvcrtex, and it gets linked when you link to ucrtbase as well. The name is based on the folder name in the library. Both libraries share some code, but each file is only compiled once.
This commit is contained in:
parent
2b2bdabe72
commit
9186b861a6
21 changed files with 79 additions and 26 deletions
27
sdk/lib/vcruntime/amd64/__security_check_cookie.s
Normal file
27
sdk/lib/vcruntime/amd64/__security_check_cookie.s
Normal file
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// __security_check_cookie.asm
|
||||
//
|
||||
// Copyright (c) 2024 Timo Kreuzer
|
||||
//
|
||||
// Implementation of __security_check_cookie for x64.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#include <asm.inc>
|
||||
|
||||
EXTERN __security_cookie:QWORD
|
||||
EXTERN __report_gsfailure:PROC
|
||||
|
||||
.code64
|
||||
|
||||
// This function must not clobber any registers!
|
||||
PUBLIC __security_check_cookie
|
||||
__security_check_cookie:
|
||||
cmp rcx, qword ptr __security_cookie[rip]
|
||||
jne __security_check_cookie_fail
|
||||
ret
|
||||
__security_check_cookie_fail:
|
||||
jmp __report_gsfailure
|
||||
|
||||
END
|
Loading…
Add table
Add a link
Reference in a new issue