From 311842a43aa34276dc41da6e2f3a63ac80d4849c Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Mon, 1 Mar 2021 15:52:05 +0100 Subject: Read elf header of launched executable --- src/include/elfload_dump.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 src/include/elfload_dump.h (limited to 'src/include/elfload_dump.h') diff --git a/src/include/elfload_dump.h b/src/include/elfload_dump.h new file mode 100755 index 00000000..251ea3b8 --- /dev/null +++ b/src/include/elfload_dump.h @@ -0,0 +1,24 @@ +#ifndef ELFLOADER_DUMP_H +#define ELFLOADER_DUMP_H + +typedef struct elfheader_s elfheader_t; + +const char* DumpSection(Elf64_Shdr *s, char* SST); +const char* DumpDynamic(Elf64_Dyn *s); +const char* DumpPHEntry(Elf64_Phdr *e); +const char* DumpSym(elfheader_t *h, Elf64_Sym* sym); +const char* DumpRelType(int t); +const char* SymName(elfheader_t *h, Elf64_Sym* sym); +const char* IdxSymName(elfheader_t *h, int sym); +void DumpMainHeader(Elf64_Ehdr *header, elfheader_t *h); +void DumpSymTab(elfheader_t *h); +void DumpDynamicSections(elfheader_t *h); +void DumpDynamicNeeded(elfheader_t *h); +void DumpDynamicRPath(elfheader_t *h); +void DumpDynSym(elfheader_t *h); +void DumpRelTable(elfheader_t *h, int cnt, Elf64_Rel *rel, const char* name); +void DumpRelATable(elfheader_t *h, int cnt, Elf64_Rela *rela, const char* name); + +void DumpBinary(char* p, int sz); + +#endif //ELFLOADER_DUMP_H \ No newline at end of file -- cgit 1.4.1