summaryrefslogtreecommitdiff
path: root/include/libelfu
diff options
context:
space:
mode:
authornorly <ny-git@enpas.org>2013-06-15 11:53:17 +0100
committernorly <ny-git@enpas.org>2013-06-15 11:53:17 +0100
commit5af52fe4fc36c1a355f4bfad58f80f52f822f768 (patch)
tree3aa1dbe051c6ca80099f21c53267c5376db01513 /include/libelfu
parent602f9247d9fe8ce4625147d0da105a43c4d869a2 (diff)
Make symtab and reltab resident in ElfuScn
Diffstat (limited to 'include/libelfu')
-rw-r--r--include/libelfu/types.h88
1 files changed, 44 insertions, 44 deletions
diff --git a/include/libelfu/types.h b/include/libelfu/types.h
index b216e53..46fbc69 100644
--- a/include/libelfu/types.h
+++ b/include/libelfu/types.h
@@ -7,49 +7,6 @@
#include <gelf.h>
-typedef struct ElfuScn {
- GElf_Shdr shdr;
-
- Elf_Data data;
-
- struct ElfuScn *linkptr;
- struct ElfuScn *infoptr;
-
- struct ElfuScn *oldptr;
-
- struct ElfuSymtab *symtab;
- struct ElfuReltab *reltab;
-
- 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;
-
-
-
-
-
typedef struct ElfuSym {
char *name;
@@ -60,7 +17,7 @@ typedef struct ElfuSym {
unsigned char type;
unsigned char other;
- ElfuScn *scnptr;
+ struct ElfuScn *scnptr;
int shndx;
CIRCLEQ_ENTRY(ElfuSym) elem;
@@ -94,4 +51,47 @@ typedef struct ElfuReltab {
} ElfuReltab;
+
+
+
+
+typedef struct ElfuScn {
+ GElf_Shdr shdr;
+
+ Elf_Data data;
+
+ struct ElfuScn *linkptr;
+ struct ElfuScn *infoptr;
+
+ struct ElfuScn *oldptr;
+
+ struct ElfuSymtab symtab;
+ struct ElfuReltab reltab;
+
+ 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