summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2015-12-22 23:24:25 -0500
committermidipix <writeonce@midipix.org>2016-11-11 00:22:30 -0500
commit67025de5a14bc568da8576b1a0cbded6ebedf7f2 (patch)
tree6cd690f5ddca1f15d523b24bc6c1bf7f93ce1214
parent7c0ec476c20697b2744dfe2d35732413fe04978d (diff)
downloadmdso-67025de5a14bc568da8576b1a0cbded6ebedf7f2.tar.bz2
mdso-67025de5a14bc568da8576b1a0cbded6ebedf7f2.tar.xz
mdso_specs.h: initial commit.
-rw-r--r--include/mdso/mdso_specs.h47
-rw-r--r--project/headers.mk1
2 files changed, 48 insertions, 0 deletions
diff --git a/include/mdso/mdso_specs.h b/include/mdso/mdso_specs.h
new file mode 100644
index 0000000..c53756a
--- /dev/null
+++ b/include/mdso/mdso_specs.h
@@ -0,0 +1,47 @@
+#ifndef MDSO_SPECS_H
+#define MDSO_SPECS_H
+
+#include <stdint.h>
+
+#define MDSO_META_SECTION ".dsometa"
+#define MDSO_SYMS_SECTION ".dsosyms"
+#define MDSO_STRS_SECTION ".dsostrs"
+#define MDSO_HASH_SECTION ".dsohash"
+
+#define MDSO_FLAG_LOADER_PATH 0x0001
+#define MDSO_FLAG_PEB_PATH 0x0002
+#define MDSO_FLAG_SYSTEM32 0x0004
+
+struct mdso_arg;
+struct mdso_meta_table;
+struct mdso_hash_table;
+struct mdso_sym_table;
+
+typedef int32_t mdso_arg_conv_fn(char *, uint16_t **);
+typedef int32_t mdso_arg_arr_conv_fn(struct mdso_arg *);
+
+struct mdso_arg {
+ char * utf8;
+ uint16_t * utf16;
+};
+
+struct mdso_sym_entry {
+ char * string;
+ struct mdso_meta_table * meta;
+};
+
+struct mdso_meta_table {
+ void * base;
+ uint32_t flags;
+ uint32_t priority;
+ uint32_t nsyms;
+ uint32_t padding;
+ struct mdso_hash_table * hashtbl;
+ struct mdso_sym_table * symtbl;
+ mdso_arg_conv_fn * fncarg;
+ mdso_arg_arr_conv_fn * fncargarr;
+ void * fnr1;
+ void * fnr2;
+};
+
+#endif
diff --git a/project/headers.mk b/project/headers.mk
index 2722875..4c37c3e 100644
--- a/project/headers.mk
+++ b/project/headers.mk
@@ -4,6 +4,7 @@ API_HEADERS = \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_crc32.h \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_crc64.h \
$(PROJECT_DIR)/include/$(PACKAGE)/mdso_output.h \
+ $(PROJECT_DIR)/include/$(PACKAGE)/mdso_specs.h \
INTERNAL_HEADERS = \
$(PROJECT_DIR)/src/internal/argv/argv.h \