mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-06-13 07:32:23 -07:00
reloc helper
This commit is contained in:
committed by
Ryan Fleury
parent
0a930be613
commit
3c0c531c53
@@ -103,6 +103,21 @@ coff_read_symbol_name(String8 string_table, COFF_SymbolName *name)
|
||||
return name_str;
|
||||
}
|
||||
|
||||
internal U64
|
||||
coff_is_addr_reloc(COFF_MachineType machine, U32 type)
|
||||
{
|
||||
U64 is_addr = 0;
|
||||
switch (machine) {
|
||||
case COFF_MachineType_Unknown: is_addr = 0; break;
|
||||
case COFF_MachineType_X64: {
|
||||
if (type == COFF_Reloc_X64_Addr32) is_addr = 4;
|
||||
else if (type == COFF_Reloc_X64_Addr64) is_addr = 8;
|
||||
} break;
|
||||
default: NotImplemented; break;
|
||||
}
|
||||
return is_addr;
|
||||
}
|
||||
|
||||
internal U64
|
||||
coff_apply_size_from_reloc_x64(COFF_Reloc_X64 x)
|
||||
{
|
||||
|
||||
@@ -601,6 +601,8 @@ internal String8 coff_read_symbol_name(String8 string_table, COFF_SymbolName *na
|
||||
////////////////////////////////
|
||||
// Reloc
|
||||
|
||||
internal U64 coff_is_addr_reloc(COFF_MachineType machine, U32 type);
|
||||
|
||||
internal U64 coff_apply_size_from_reloc_x64(COFF_Reloc_X64 x);
|
||||
internal U64 coff_apply_size_from_reloc_x86(COFF_Reloc_X86 x);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user