diff options
Diffstat (limited to 'include/libelfu/modeltypes.h')
-rw-r--r-- | include/libelfu/modeltypes.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/libelfu/modeltypes.h b/include/libelfu/modeltypes.h new file mode 100644 index 0000000..18f6671 --- /dev/null +++ b/include/libelfu/modeltypes.h @@ -0,0 +1,43 @@ +#ifndef __LIBELFU_MODELTYPES_H__ +#define __LIBELFU_MODELTYPES_H__ + +#include <sys/queue.h> + +#include <elf.h> +#include <gelf.h> + +typedef struct ElfuData { + Elf_Data data; + + CIRCLEQ_ENTRY(ElfuData) elem; +} ElfuData; + + +typedef struct ElfuScn { + GElf_Shdr shdr; + + CIRCLEQ_HEAD(DataList, ElfuData) dataList; + + CIRCLEQ_ENTRY(ElfuScn) elem; +} ElfuScn; + + +typedef struct ElfuPhdr { + GElf_Phdr phdr; + + CIRCLEQ_ENTRY(ElfuPhdr) elem; +} ElfuPhdr; + + +typedef struct { + int elfclass; + GElf_Ehdr ehdr; + + CIRCLEQ_HEAD(ScnList, ElfuScn) scnList; + CIRCLEQ_HEAD(PhdrList, ElfuPhdr) phdrList; + + ElfuScn *shstrtab; +} ElfuElf; + + +#endif |