diff options
author | norly <ny-git@enpas.org> | 2013-02-23 16:08:26 +0000 |
---|---|---|
committer | norly <ny-git@enpas.org> | 2013-02-23 16:09:15 +0000 |
commit | 9b3f4d15112365dbda20c668d0d57a74bd05e60c (patch) | |
tree | 39de5a71062270f6d181b74b32dd8beb1da434ec /include/libelfu/modeltypes.h | |
parent | 6e4cbafe0876ff14ff03a14ab80951167ef67e06 (diff) |
Refactor mdoel-related code
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 |