mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-09 01:15:41 +00:00
ELF note parser
This commit is contained in:
committed by
Ryan Fleury
parent
b596a6ed8a
commit
6cc7b5622c
+30
-5
@@ -10,22 +10,22 @@
|
||||
typedef struct ELF_Shdr64Array ELF_Shdr64Array;
|
||||
struct ELF_Shdr64Array
|
||||
{
|
||||
U64 count;
|
||||
ELF_Shdr64 *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct ELF_Phdr64Array ELF_Phdr64Array;
|
||||
struct ELF_Phdr64Array
|
||||
{
|
||||
U64 count;
|
||||
ELF_Phdr64 *v;
|
||||
U64 count;
|
||||
};
|
||||
|
||||
typedef struct ELF_Bin ELF_Bin;
|
||||
struct ELF_Bin
|
||||
{
|
||||
ELF_Hdr64 hdr;
|
||||
Rng1U64 sh_name_range;
|
||||
ELF_Hdr64 hdr;
|
||||
Rng1U64 sh_name_range;
|
||||
ELF_Shdr64Array shdrs;
|
||||
ELF_Phdr64Array phdrs;
|
||||
};
|
||||
@@ -34,7 +34,30 @@ typedef struct ELF_GnuDebugLink ELF_GnuDebugLink;
|
||||
struct ELF_GnuDebugLink
|
||||
{
|
||||
String8 path;
|
||||
U32 checksum;
|
||||
U32 checksum;
|
||||
};
|
||||
|
||||
typedef struct ELF_Note ELF_Note;
|
||||
struct ELF_Note
|
||||
{
|
||||
String8 owner;
|
||||
ELF_NoteType type;
|
||||
String8 desc;
|
||||
};
|
||||
|
||||
typedef struct ELF_NoteNode ELF_NoteNode;
|
||||
struct ELF_NoteNode
|
||||
{
|
||||
ELF_Note v;
|
||||
ELF_NoteNode *next;
|
||||
};
|
||||
|
||||
typedef struct ELF_NoteList ELF_NoteList;
|
||||
struct ELF_NoteList
|
||||
{
|
||||
U64 count;
|
||||
ELF_NoteNode *first;
|
||||
ELF_NoteNode *last;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
@@ -49,4 +72,6 @@ internal String8 elf_name_from_shdr64(String8 raw_data, ELF_Bin *bin, ELF_Shdr64
|
||||
internal U64 elf_base_addr_from_bin(ELF_Bin *bin);
|
||||
internal ELF_GnuDebugLink elf_gnu_debug_link_from_bin(String8 raw_data, ELF_Bin *bin);
|
||||
|
||||
internal ELF_NoteList elf_parse_note(Arena *arena, String8 raw_note, ELF_Class elf_class, ELF_MachineKind e_machine);
|
||||
|
||||
#endif // ELF_PARSE_H
|
||||
|
||||
Reference in New Issue
Block a user