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
diff --git a/libc/arch-x86/bionic/crtbegin.c b/libc/arch-x86/bionic/crtbegin.c
index 5106d9e..63e58a6 100755
--- a/libc/arch-x86/bionic/crtbegin.c
+++ b/libc/arch-x86/bionic/crtbegin.c
@@ -26,21 +26,8 @@
  * SUCH DAMAGE.
  */
 
-typedef struct
-{
-    void (**preinit_array)(void);
-    void (**init_array)(void);
-    void (**fini_array)(void);
-} structors_array_t;
-
-extern int main(int argc, char **argv, char **env);
-
-extern void __libc_init(
-  unsigned int *elfdata,
-  void (*onexit)(void),
-  int (*slingshot)(int, char**, char**),
-  structors_array_t const * const structors
-);
+#include "../../bionic/libc_init_common.h"
+#include <stddef.h>
 
 __attribute__ ((section (".preinit_array")))
 void (*__PREINIT_ARRAY__)(void) = (void (*)(void)) -1;
@@ -51,18 +38,16 @@
 __attribute__ ((section (".fini_array")))
 void (*__FINI_ARRAY__)(void) = (void (*)(void)) -1;
 
-__attribute__((visibility("hidden")))
+__LIBC_HIDDEN__
 __attribute__((force_align_arg_pointer))
 void _start() {
   structors_array_t array;
-  void *elfdata;
-
   array.preinit_array = &__PREINIT_ARRAY__;
-  array.init_array =    &__INIT_ARRAY__;
-  array.fini_array =    &__FINI_ARRAY__;
+  array.init_array = &__INIT_ARRAY__;
+  array.fini_array = &__FINI_ARRAY__;
 
-  elfdata = __builtin_frame_address(0) + sizeof(void *);
-  __libc_init(elfdata, (void *) 0, &main, &array);
+  void* raw_args = __builtin_frame_address(0) + sizeof(void*);
+  __libc_init(raw_args, NULL, &main, &array);
 }
 
 #include "__dso_handle.h"