mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-31 11:20:03 +00:00
workaround for image base address
This commit is contained in:
committed by
Ryan Fleury
parent
971f6ec368
commit
d5297e01ac
+9
-1
@@ -1140,9 +1140,17 @@ THREAD_POOL_TASK_FUNC(lnk_obj_reloc_patcher)
|
|||||||
} else if (obj->header.machine != COFF_MachineType_Unknown) {
|
} else if (obj->header.machine != COFF_MachineType_Unknown) {
|
||||||
NotImplemented;
|
NotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
symbol_secnum = 0;
|
symbol_secnum = 0;
|
||||||
symbol_secoff = 0;
|
symbol_secoff = 0;
|
||||||
symbol_voff = safe_cast_u32(symbol.value);
|
// There aren't enough bits in COFF symbol to store full image base address,
|
||||||
|
// so we special case __ImageBase. A better solution would be to add
|
||||||
|
// a 64-bit symbol format to COFF.
|
||||||
|
if (str8_match(symbol.name, str8_lit("__ImageBase"), 0)) {
|
||||||
|
symbol_voff = 0;
|
||||||
|
} else {
|
||||||
|
symbol_voff = symbol.value - task->image_base;
|
||||||
|
}
|
||||||
} else if (interp == COFF_SymbolValueInterp_Weak) {
|
} else if (interp == COFF_SymbolValueInterp_Weak) {
|
||||||
// unresolved weak
|
// unresolved weak
|
||||||
} else if (interp == COFF_SymbolValueInterp_Undefined) {
|
} else if (interp == COFF_SymbolValueInterp_Undefined) {
|
||||||
|
|||||||
Reference in New Issue
Block a user