diff options
author | Ryan Prichard <rprichard@google.com> | 2018-11-22 02:41:36 -0800 |
---|---|---|
committer | Ryan Prichard <rprichard@google.com> | 2018-11-28 14:26:14 -0800 |
commit | 48b1159bb82b12bdd75be9228bd43db45168bdba (patch) | |
tree | 876b546289ca58c6bb0a923c325aedeef7fd5cf8 /libc/bionic/libc_init_common.h | |
parent | 7752bcb234a9960d2e9e89766d143b7ac0c5f332 (diff) | |
download | android_bionic-48b1159bb82b12bdd75be9228bd43db45168bdba.tar.gz android_bionic-48b1159bb82b12bdd75be9228bd43db45168bdba.tar.bz2 android_bionic-48b1159bb82b12bdd75be9228bd43db45168bdba.zip |
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
Diffstat (limited to 'libc/bionic/libc_init_common.h')
-rw-r--r-- | libc/bionic/libc_init_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/bionic/libc_init_common.h b/libc/bionic/libc_init_common.h index 6ce4d10ef..84b59ca2d 100644 --- a/libc/bionic/libc_init_common.h +++ b/libc/bionic/libc_init_common.h @@ -54,8 +54,8 @@ class KernelArgumentBlock; __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 |