1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

Reproducing hashed base address for linking

This commit is contained in:
Brian Fiete 2020-07-01 12:46:04 -07:00
parent 46a7e0568d
commit cfff1d6bc4

View file

@ -798,6 +798,13 @@ namespace IDE
linkLine.Append("-nologo ");
//linkLine.Append("-fixed ");
if ((workspaceOptions.mAllowHotSwapping) && (is64Bit))
{
int nameHash = targetPath.GetHashCode();
int64 wantAddress = (((nameHash & 0x3FFFF) + 0x10) << 28);
linkLine.AppendF("-base:0x{0:X} -dynamicbase:no ", wantAddress);
}
// Incremental just seems to be slower for Beef. Test on larger projects to verify
linkLine.Append("-incremental:no ");