mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-06 05:48:40 +00:00
linker checkpoint
This commit is contained in:
committed by
Ryan Fleury
parent
a60216fa9f
commit
7c071e7238
+11
-2
@@ -1,4 +1,4 @@
|
||||
// Copyright (c) 2024 Epic Games Tools
|
||||
// Copyright (c) 2025 Epic Games Tools
|
||||
// Licensed under the MIT license (https://opensource.org/license/mit/)
|
||||
|
||||
////////////////////////////////
|
||||
@@ -396,7 +396,11 @@ lnk_get_base_addr(LNK_Config *config)
|
||||
if (config->file_characteristics & PE_ImageFileCharacteristic_FILE_DLL) {
|
||||
base_addr = coff_default_dll_base_from_machine(config->machine);
|
||||
} else if (config->file_characteristics & PE_ImageFileCharacteristic_EXE) {
|
||||
base_addr = coff_default_exe_base_from_machine(config->machine);
|
||||
if ((~config->file_characteristics & PE_ImageFileCharacteristic_LARGE_ADDRESS_AWARE) && config->machine == COFF_MachineType_X64) {
|
||||
base_addr = coff_default_exe_base_from_machine(COFF_MachineType_X86);
|
||||
} else {
|
||||
base_addr = coff_default_exe_base_from_machine(config->machine);
|
||||
}
|
||||
} else {
|
||||
lnk_error(LNK_Error_Cmdl, "image type is not specified.");
|
||||
}
|
||||
@@ -2002,6 +2006,11 @@ lnk_config_from_cmd_line(Arena *arena, String8List raw_cmd_line)
|
||||
config->opt_lbr = LNK_SwitchState_Yes;
|
||||
}
|
||||
}
|
||||
|
||||
// warn about unused large address aware flag
|
||||
if ((~config->file_characteristics & PE_ImageFileCharacteristic_LARGE_ADDRESS_AWARE) && (config->file_characteristics & PE_ImageFileCharacteristic_FILE_DLL)) {
|
||||
lnk_error(LNK_Warning_NoLargeAddressAwarenessForDll, "/LARGEADDRESSAWARE:NO has no effect when specified together with /DLL");
|
||||
}
|
||||
|
||||
// error check base address flags
|
||||
if (config->flags & LNK_ConfigFlag_Fixed) {
|
||||
|
||||
Reference in New Issue
Block a user