X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=include%2Flibelfu%2Ftypes.h;h=a06d4706d0036c638807d6fe52eebbe3e3958521;hb=4addee4bda6064926b24cd1ae929303003bd9ff1;hp=a59efca7e78ace74d7dfb139442f1d6604a262e6;hpb=eb5a1daba781013ccf168b95510d0f67f0b9c946;p=centaur.git diff --git a/include/libelfu/types.h b/include/libelfu/types.h index a59efca..a06d470 100644 --- a/include/libelfu/types.h +++ b/include/libelfu/types.h @@ -1,6 +1,47 @@ #ifndef __LIBELFU_TYPES_H__ #define __LIBELFU_TYPES_H__ +#include + +#include +#include + + +typedef struct ElfuScn { + GElf_Shdr shdr; + + Elf_Data data; + + struct ElfuScn *linkptr; + struct ElfuScn *infoptr; + + struct ElfuScn *oldptr; + + CIRCLEQ_ENTRY(ElfuScn) elemChildScn; + CIRCLEQ_ENTRY(ElfuScn) elem; +} ElfuScn; + + +typedef struct ElfuPhdr { + GElf_Phdr phdr; + + CIRCLEQ_HEAD(ChildScnList, ElfuScn) childScnList; + CIRCLEQ_HEAD(ChildPhdrList, ElfuPhdr) childPhdrList; + + CIRCLEQ_ENTRY(ElfuPhdr) elemChildPhdr; + CIRCLEQ_ENTRY(ElfuPhdr) elem; +} ElfuPhdr; + + +typedef struct { + int elfclass; + GElf_Ehdr ehdr; + + CIRCLEQ_HEAD(PhdrList, ElfuPhdr) phdrList; + CIRCLEQ_HEAD(OrphanScnList, ElfuScn) orphanScnList; + + ElfuScn *shstrtab; +} ElfuElf; #endif