Use shared globals to init __progname + environ
Initialize the __progname and environ global variables using
libc_shared_globals rather than KernelArgumentBlock.
Also: suppose the linker is invoked on an executable:
linker prog [args...]
The first argument passed to main() and constructor functions is "prog"
rather than "linker". For consistency, this CL changes the BSD
__progname global from "linker" to "prog".
Bug: none
Test: bionic unit tests
Change-Id: I376d76953c9436706dbc53911ef6585c1acc1c31
diff --git a/libc/bionic/libc_init_common.h b/libc/bionic/libc_init_common.h
index 6ce4d10..84b59ca 100644
--- a/libc/bionic/libc_init_common.h
+++ b/libc/bionic/libc_init_common.h
@@ -54,8 +54,8 @@
__LIBC_HIDDEN__ void __libc_init_globals(KernelArgumentBlock& args);
-__LIBC_HIDDEN__ void __libc_init_common(KernelArgumentBlock& args);
+__LIBC_HIDDEN__ void __libc_init_common();
-__LIBC_HIDDEN__ void __libc_init_AT_SECURE(KernelArgumentBlock& args);
+__LIBC_HIDDEN__ void __libc_init_AT_SECURE(char** envp);
#endif