summaryrefslogtreecommitdiffstats
path: root/preload.h
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-03-21 11:47:01 +0100
committerJohn Crispin <blogic@openwrt.org>2015-03-23 08:09:26 +0100
commitdfcfcca7baf2b22d8dac1a724bdb7dd9d52f4c05 (patch)
tree3a816421a7ad85c27bc9a174d73cf8fda7b776c8 /preload.h
parent0cf744c720c9ed01c2dae25f338d4e96b9db95e3 (diff)
downloadunitd-dfcfcca7baf2b22d8dac1a724bdb7dd9d52f4c05.tar
unitd-dfcfcca7baf2b22d8dac1a724bdb7dd9d52f4c05.zip
add initial version of ujail and utrace
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'preload.h')
-rw-r--r--preload.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/preload.h b/preload.h
new file mode 100644
index 0000000..5e663ac
--- /dev/null
+++ b/preload.h
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2015 John Crispin <blogic@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <link.h>
+
+#ifndef __unbounded
+#define __unbounded
+#endif
+
+#ifndef attribute_unused
+#define attribute_unused __attribute__ ((unused))
+#endif
+typedef int (*main_t)(int, char **, char **);
+
+typedef int (*start_main_t)(main_t main, int, char *__unbounded *__unbounded,
+ ElfW(auxv_t) *,
+ __typeof (main),
+ void (*fini) (void),
+ void (*rtld_fini) (void),
+ void *__unbounded stack_end);
+
+int __libc_start_main(main_t main,
+ int argc,
+ char **argv,
+ ElfW(auxv_t) *auxvec,
+ __typeof (main) init,
+ void (*fini) (void),
+ void (*rtld_fini) (void),
+ void *stack_end);
+
+
+typedef void (*uClibc_main)(main_t main,
+ int argc,
+ char **argv,
+ void (*app_init)(void),
+ void (*app_fini)(void),
+ void (*rtld_fini)(void),
+ void *stack_end attribute_unused);
+
+void __uClibc_main(main_t main,
+ int argc,
+ char **argv,
+ void (*app_init)(void),
+ void (*app_fini)(void),
+ void (*rtld_fini)(void),
+ void *stack_end attribute_unused);