Remove unneeded struct member and fix references to it
[centaur.git] / include / libelfu / types.h
1 #ifndef __LIBELFU_TYPES_H__
2 #define __LIBELFU_TYPES_H__
3
4 #include <sys/queue.h>
5
6 #include <elf.h>
7 #include <gelf.h>
8
9
10 typedef struct ElfuSym {
11   GElf_Word name;
12
13   GElf_Addr value;
14   GElf_Word size;
15
16   unsigned char bind;
17   unsigned char type;
18   unsigned char other;
19
20   struct ElfuScn *scnptr;
21   int shndx;
22
23   CIRCLEQ_ENTRY(ElfuSym) elem;
24 } ElfuSym;
25
26
27 typedef struct ElfuSymtab {
28   CIRCLEQ_HEAD(Syms, ElfuSym) syms;
29 } ElfuSymtab;
30
31
32
33 typedef struct ElfuRel {
34   char *name;
35
36   GElf_Addr offset;
37   GElf_Word info;
38
39   GElf_Word sym;
40   unsigned char type;
41
42   int addendUsed;
43   GElf_Sword addend;
44
45   CIRCLEQ_ENTRY(ElfuRel) elem;
46 } ElfuRel;
47
48
49 typedef struct ElfuReltab {
50   CIRCLEQ_HEAD(Rels, ElfuRel) rels;
51 } ElfuReltab;
52
53
54
55
56
57
58 typedef struct ElfuScn {
59   GElf_Shdr shdr;
60
61   struct ElfuScn *linkptr;
62   struct ElfuScn *infoptr;
63   char *databuf;
64
65   struct ElfuScn *oldptr;
66
67   struct ElfuSymtab symtab;
68   struct ElfuReltab reltab;
69
70   CIRCLEQ_ENTRY(ElfuScn) elemChildScn;
71 } ElfuScn;
72
73
74 typedef struct ElfuPhdr {
75   GElf_Phdr phdr;
76
77   CIRCLEQ_HEAD(ChildScnList, ElfuScn) childScnList;
78   CIRCLEQ_HEAD(ChildPhdrList, ElfuPhdr) childPhdrList;
79
80   CIRCLEQ_ENTRY(ElfuPhdr) elemChildPhdr;
81   CIRCLEQ_ENTRY(ElfuPhdr) elem;
82 } ElfuPhdr;
83
84
85 typedef struct {
86   int elfclass;
87   GElf_Ehdr ehdr;
88
89   CIRCLEQ_HEAD(PhdrList, ElfuPhdr) phdrList;
90   CIRCLEQ_HEAD(OrphanScnList, ElfuScn) orphanScnList;
91
92   ElfuScn *shstrtab;
93
94   ElfuScn *symtab;
95 } ElfuElf;
96
97 #endif