Mercurial > repos > blastem
comparison vos_program_module.h @ 744:fc68992cf18d
Merge windows branch with latest changes
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 28 May 2015 21:19:55 -0700 |
parents | de6f00204fa2 |
children |
comparison
equal
deleted
inserted
replaced
743:cf78cb045fa4 | 744:fc68992cf18d |
---|---|
1 #ifndef VOS_PROGRAM_MODULE_H_ | |
2 #define VOS_PROGRAM_MODULE_H_ | |
3 | |
4 #include <stdint.h> | |
5 | |
6 typedef struct | |
7 { | |
8 struct { | |
9 uint16_t len; | |
10 char str[32]; | |
11 } name; | |
12 uint16_t unknown[5]; | |
13 uint32_t code_address; | |
14 uint32_t code_length; | |
15 uint32_t foo_address; | |
16 uint32_t foo_length; | |
17 uint32_t bar_address; | |
18 uint32_t bar_length; | |
19 uint16_t unknown2[3]; | |
20 } vos_module_map_entry; | |
21 | |
22 typedef struct | |
23 { | |
24 struct { | |
25 uint16_t len; | |
26 char str[32]; | |
27 } name; | |
28 uint32_t address; | |
29 uint16_t unknown[3]; | |
30 } vos_external_var_entry; | |
31 | |
32 typedef struct | |
33 { | |
34 uint16_t version; | |
35 struct { | |
36 uint16_t len; | |
37 char str[32]; | |
38 } binder_version; | |
39 struct { | |
40 uint16_t len; | |
41 char str[32]; | |
42 } binder_options; | |
43 struct { | |
44 uint16_t len; | |
45 char str[32]; | |
46 } system_name; | |
47 struct { | |
48 uint16_t len; | |
49 char str[65]; | |
50 } user_name; | |
51 uint32_t date_bound; | |
52 struct { | |
53 uint32_t code_address; | |
54 uint32_t static_address; | |
55 } main_entry_link; | |
56 uint32_t user_boundary; | |
57 uint16_t n_modules; | |
58 uint16_t n_external_vars; | |
59 uint16_t n_link_names; | |
60 uint16_t n_unsnapped_links; | |
61 uint16_t n_vm_pages; | |
62 uint16_t n_header_pages; | |
63 struct { | |
64 uint32_t address; | |
65 uint32_t len; | |
66 } info[3][4]; | |
67 uint32_t module_map_address; | |
68 uint32_t module_map_len; | |
69 uint32_t external_vars_map_address; | |
70 uint32_t external_vars_map_len; | |
71 uint32_t link_names_map_address; | |
72 uint32_t link_names_map_len; | |
73 uint32_t link_map_address; | |
74 uint32_t link_map_len; | |
75 uint32_t header_address; | |
76 uint32_t header_len; | |
77 uint8_t access_info[2048]; | |
78 uint32_t flags; | |
79 uint16_t n_tasks; | |
80 uint32_t task_static_len[3]; | |
81 uint32_t stack_len; | |
82 uint16_t n_entries; | |
83 uint32_t entry_map_address; | |
84 uint32_t entry_map_len; | |
85 uint16_t pop_version; | |
86 uint16_t processor; | |
87 struct { | |
88 uint16_t len; | |
89 char str[32]; | |
90 } release_name; | |
91 struct { | |
92 uint32_t map_address; | |
93 uint32_t map_len; | |
94 uint32_t n_relocations; | |
95 } relocation_info; | |
96 uint32_t high_water_mark; | |
97 struct { | |
98 uint16_t len; | |
99 char str[256]; | |
100 } copyright_notice; | |
101 uint32_t module_origins[14]; | |
102 uint16_t processor_family; | |
103 struct { | |
104 uint16_t len; | |
105 char str[32]; | |
106 } program_name; | |
107 uint32_t string_pool_address; | |
108 uint32_t string_pool_len; | |
109 uint32_t obj_dir_map_address; | |
110 uint32_t obj_dir_map_len; | |
111 uint32_t global_offset_table_address[3]; | |
112 struct { | |
113 uint32_t address; | |
114 uint32_t len; | |
115 } block_map_info[3]; | |
116 uint32_t section_map_file_address; | |
117 uint32_t section_map_address; | |
118 uint32_t section_map_len; | |
119 uint16_t n_sections; | |
120 uint32_t max_heap_size; | |
121 uint32_t max_program_size; | |
122 uint32_t max_stack_size; | |
123 uint32_t stack_fence_size; | |
124 | |
125 vos_module_map_entry *module_map_entries; | |
126 vos_external_var_entry *external_vars; | |
127 } vos_program_module; | |
128 | |
129 int vos_read_header(FILE * f, vos_program_module *out); | |
130 int vos_read_alloc_module_map(FILE * f, vos_program_module *header); | |
131 int vos_read_alloc_external_vars(FILE * f, vos_program_module *header); | |
132 void vos_header_cleanup(vos_program_module *header); | |
133 | |
134 #endif //VOS_PROGRAM_MODULE_H_ |