summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2017-12-12 10:48:31 -0500
committermidipix <writeonce@midipix.org>2017-12-13 05:08:19 -0500
commitc64273bcc029161e1c34806fd3194975836d652b (patch)
treef233179efb03259a79b498d37c6f9d649c460c89
parent7e1d96703997547e21c88b44f6d738eef1f6166e (diff)
downloadmdso-c64273bcc029161e1c34806fd3194975836d652b.tar.bz2
mdso-c64273bcc029161e1c34806fd3194975836d652b.tar.xz
mdso_structs: initial commit, providing raw (endian-agnostic) struct defs.
-rw-r--r--include/mdso/mdso_structs.h80
-rw-r--r--project/headers.mk1
2 files changed, 81 insertions, 0 deletions
diff --git a/include/mdso/mdso_structs.h b/include/mdso/mdso_structs.h
new file mode 100644
index 0000000..133825e
--- /dev/null
+++ b/include/mdso/mdso_structs.h
@@ -0,0 +1,80 @@
+#ifndef MDSO_STRUCTS_H
+#define MDSO_STRUCTS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct mdso_raw_arg_m32 {
+ unsigned char marg_utf8 [0x04]; /* 0x00 */
+ unsigned char marg_utf16 [0x04]; /* 0x04 */
+};
+
+struct mdso_raw_arg_m64 {
+ unsigned char marg_utf8 [0x08]; /* 0x00 */
+ unsigned char marg_utf16 [0x08]; /* 0x08 */
+};
+
+union mdso_raw_arg {
+ struct mdso_raw_arg_m32 marg_m32;
+ struct mdso_raw_arg_m64 marg_m64;
+};
+
+
+struct mdso_raw_sym_entry_m32 {
+ unsigned char msym_string [0x04]; /* 0x00 */
+ unsigned char msym_meta [0x04]; /* 0x04 */
+};
+
+struct mdso_raw_sym_entry_m64 {
+ unsigned char msym_string [0x08]; /* 0x00 */
+ unsigned char msym_meta [0x08]; /* 0x08 */
+};
+
+union mdso_raw_sym_entry {
+ struct mdso_raw_sym_entry_m32 msym_m32;
+ struct mdso_raw_sym_entry_m64 msym_m64;
+};
+
+
+struct mdso_raw_meta_record_m32 {
+ unsigned char mrec_base [0x04]; /* 0x00 */
+ unsigned char mrec_name [0x04]; /* 0x04 */
+ unsigned char mrec_flags [0x04]; /* 0x08 */
+ unsigned char mrec_priority [0x04]; /* 0x0c */
+ unsigned char mrec_nsyms [0x04]; /* 0x10 */
+ unsigned char mrec_padding [0x04]; /* 0x14 */
+ unsigned char mrec_hashtbl [0x04]; /* 0x18 */
+ unsigned char mrec_symtbl [0x04]; /* 0x1c */
+ unsigned char mrec_fncarg [0x04]; /* 0x20 */
+ unsigned char mrec_fncargarr [0x04]; /* 0x24 */
+ unsigned char mrec_fnr1 [0x04]; /* 0x28 */
+ unsigned char mrec_fnr2 [0x04]; /* 0x2c */
+};
+
+struct mdso_raw_meta_record_m64 {
+ unsigned char mrec_base [0x08]; /* 0x00 */
+ unsigned char mrec_name [0x08]; /* 0x08 */
+ unsigned char mrec_flags [0x04]; /* 0x10 */
+ unsigned char mrec_priority [0x04]; /* 0x14 */
+ unsigned char mrec_nsyms [0x04]; /* 0x18 */
+ unsigned char mrec_padding [0x04]; /* 0x1c */
+ unsigned char mrec_hashtbl [0x08]; /* 0x20 */
+ unsigned char mrec_symtbl [0x08]; /* 0x28 */
+ unsigned char mrec_fncarg [0x08]; /* 0x30 */
+ unsigned char mrec_fncargarr [0x08]; /* 0x38 */
+ unsigned char mrec_fnr1 [0x08]; /* 0x40 */
+ unsigned char mrec_fnr2 [0x08]; /* 0x48 */
+};
+
+union mdso_raw_meta_record {
+ struct mdso_raw_meta_record_m32 mrec_m32;
+ struct mdso_raw_meta_record_m64 mrec_m64;
+};
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/project/headers.mk b/project/headers.mk
index 7fb8763..e44ed18 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -5,6 +5,7 @@ API_HEADERS = \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_crc64.h \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_output.h \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_specs.h \
+ $(PROJECT_DIR)/include/$(PACKAGE)/mdso_structs.h \
INTERNAL_HEADERS = \
$(PROJECT_DIR)/src/internal/argv/argv.h \