mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 12:58:41 +00:00
helper for querying machine specific relocation for virtual offset relocation
This commit is contained in:
committed by
Ryan Fleury
parent
c55c60549e
commit
3ffd8c19ea
@@ -253,6 +253,18 @@ coff_pick_reloc_value_x64(COFF_Reloc_X64 type,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
internal COFF_RelocType
|
||||||
|
coff_virt_off_reloc_from_machine(COFF_MachineType machine)
|
||||||
|
{
|
||||||
|
COFF_RelocType result = 0;
|
||||||
|
switch (machine) {
|
||||||
|
case COFF_MachineType_Unknown: break;
|
||||||
|
case COFF_MachineType_X64: result = COFF_Reloc_X64_Addr32Nb; break;
|
||||||
|
default: { NotImplemented; } break;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
internal String8
|
internal String8
|
||||||
coff_make_import_lookup(Arena *arena, U16 hint, String8 name)
|
coff_make_import_lookup(Arena *arena, U16 hint, String8 name)
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-1
@@ -602,7 +602,8 @@ internal String8 coff_read_symbol_name(String8 string_table, COFF_SymbolName *na
|
|||||||
internal U64 coff_apply_size_from_reloc_x64(COFF_Reloc_X64 x);
|
internal U64 coff_apply_size_from_reloc_x64(COFF_Reloc_X64 x);
|
||||||
internal U64 coff_apply_size_from_reloc_x86(COFF_Reloc_X86 x);
|
internal U64 coff_apply_size_from_reloc_x86(COFF_Reloc_X86 x);
|
||||||
|
|
||||||
internal COFF_RelocValue coff_pick_reloc_valuex64(COFF_Reloc_X64 type, U64 reloc_virtual_offset, U32 symbol_section_number, U32 symbol_section_offset, U32 symbol_virtual_offset, U64 symbol_address);
|
internal COFF_RelocValue coff_pick_reloc_value_x64(COFF_Reloc_X64 type, U64 reloc_virtual_offset, U32 symbol_section_number, U32 symbol_section_offset, U32 symbol_virtual_offset, U64 symbol_address);
|
||||||
|
internal COFF_RelocType coff_virt_off_reloc_from_machine(COFF_MachineType machine);
|
||||||
|
|
||||||
////////////////////////////////
|
////////////////////////////////
|
||||||
// Import
|
// Import
|
||||||
|
|||||||
Reference in New Issue
Block a user