-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathreexport.h
49 lines (26 loc) · 932 Bytes
/
reexport.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
struct exported_node
{
exported_node* child;
exported_node* sibling;
int offs;
int nterm;
// so that we can process the command
int flags;
uint32_t stub;
uint32_t resolver;
uint32_t ordinal;
char base[0x200];
char reexport[0x200];
char terminal[0x200];
};
uint32_t append_uleb(char* p, uint32_t val);
uintptr_t read_uleb128(const uint8_t*& p, const uint8_t* end);
void scan_export_tree(
const uint8_t *start, int len, char* strbuf,
void (*callback)(exported_node* node, uintptr_t context), uintptr_t context = NULL,
const uint32_t coffset = 0, const uint8_t tabdepth = 0);
void print_export_commands_sub(exported_node* node, uintptr_t context);
void print_export_commands(const uintptr_t start, int len);
void export_construct_terminal(exported_node* node);
void export_add_node(exported_node** _basenode, exported_node* node);
int export_finalize(char* obuf, exported_node* basenode);