move entry point name redirection helper to MSCRT layer

This commit is contained in:
Nikita Smith
2025-08-27 13:17:42 -07:00
committed by Ryan Fleury
parent e1b7168605
commit b0db2b19f8
2 changed files with 20 additions and 0 deletions
+16
View File
@@ -1,6 +1,22 @@
// Copyright (c) Epic Games Tools
// Licensed under the MIT license (https://opensource.org/license/mit/)
internal String8
msvcrt_ctr_entry_from_user_entry(String8 user_entry)
{
String8 crt_entry = {0};
if (str8_match_lit("wmain", user_entry, 0)) {
crt_entry = str8_lit("wmainCRTStartup");
} else if (str8_match_lit("main", user_entry, 0)) {
crt_entry = str8_lit("mainCRTStartup");
} else if (str8_match_lit("WinMain", user_entry, 0)) {
crt_entry = str8_lit("WinMainCRTStartup");
} else if (str8_match_lit("wWinMain", user_entry, 0)) {
crt_entry = str8_lit("wWinMainCRTStartup");
}
return crt_entry;
}
internal String8
mscrt_delay_load_helper_name_from_machine(COFF_MachineType machine)
{
+4
View File
@@ -343,6 +343,10 @@ typedef struct MSCRT_ParsedFuncInfoV4
MSCRT_IP2State32V4 ip2state_map;
} MSCRT_ParsedFuncInfoV4;
//- Entry Point
internal String8 msvcrt_ctr_entry_from_user_entry(String8 user_entry_point);
//- Delay Load Helper
internal String8 mscrt_delay_load_helper_name_from_machine(COFF_MachineType machine);