aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/libc_init_common.h
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-02-07 10:14:39 -0800
committerElliott Hughes <enh@google.com>2013-02-07 11:44:21 -0800
commit42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6 (patch)
tree0fb55a369b620ef79cfa103f67a5184f067dadeb /libc/bionic/libc_init_common.h
parentd32fdbaf03f688497adbec885e85c0a69f7a4542 (diff)
downloadandroid_bionic-42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6.tar.gz
android_bionic-42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6.tar.bz2
android_bionic-42b2c6a5eed5e4ef35315b8cd32d1355f12a69b6.zip
Clean up the argc/argv/envp/auxv handling.
There's now only one place where we deal with this stuff, it only needs to be parsed once by the dynamic linker (rather than by each recipient), and it's now easier for us to get hold of auxv data early on. Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
Diffstat (limited to 'libc/bionic/libc_init_common.h')
-rw-r--r--libc/bionic/libc_init_common.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/libc/bionic/libc_init_common.h b/libc/bionic/libc_init_common.h
index c55594b98..23ac30554 100644
--- a/libc/bionic/libc_init_common.h
+++ b/libc/bionic/libc_init_common.h
@@ -28,16 +28,29 @@
#ifndef LIBC_INIT_COMMON_H
#define LIBC_INIT_COMMON_H
-#include <stdint.h>
+#include <sys/cdefs.h>
-typedef struct
-{
- void (**preinit_array)(void);
- void (**init_array)(void);
- void (**fini_array)(void);
+typedef struct {
+ void (**preinit_array)(void);
+ void (**init_array)(void);
+ void (**fini_array)(void);
} structors_array_t;
-extern void __libc_init_common(uintptr_t *elfdata);
-extern void __libc_fini(void* finit_array);
+__BEGIN_DECLS
+
+extern int main(int argc, char** argv, char** env);
+
+__noreturn void __libc_init(void* raw_args,
+ void (*onexit)(void),
+ int (*slingshot)(int, char**, char**),
+ structors_array_t const * const structors);
+void __libc_fini(void* finit_array);
+
+__END_DECLS
+
+#if defined(__cplusplus)
+struct KernelArgumentBlock;
+void __libc_init_common(KernelArgumentBlock& args);
+#endif
#endif