diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2013-01-07 17:58:27 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2013-01-07 17:58:27 +0000 |
commit | d549ead6a9b96936cf23dd4672fe926a0cd9ddeb (patch) | |
tree | 089d450b585552ae260a600f8fb4848dfd8480b9 /lib/csu/powerpc64 | |
parent | 878b1fbdce7ff13610c30bc5d11f455b0c223ea3 (diff) | |
download | src-d549ead6a9b96936cf23dd4672fe926a0cd9ddeb.tar.gz src-d549ead6a9b96936cf23dd4672fe926a0cd9ddeb.zip |
Only assign the environ in the startup code when environ is NULL.
Preloaded library could have changed the environment, and
unconditional assingment to the environ undoes the customization.
The binaries needs to be recompiled to get the fix.
Move the common code to set up environ and __progname into the helper.
Note that ia64 possibly not fixed, due to it still using old csu.
Reported and tested by: John Hein <jhein@symmetricom.com>
Reviewed by: kan, scf
Approved by: secteam (simon)
MFC after: 2 weeks
Notes
Notes:
svn path=/head/; revision=245133
Diffstat (limited to 'lib/csu/powerpc64')
-rw-r--r-- | lib/csu/powerpc64/crt1.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/csu/powerpc64/crt1.c b/lib/csu/powerpc64/crt1.c index a7c3581361f0..35c5a6e5c481 100644 --- a/lib/csu/powerpc64/crt1.c +++ b/lib/csu/powerpc64/crt1.c @@ -81,10 +81,7 @@ _start(int argc, char **argv, char **env, struct ps_strings *ps_strings) { - environ = env; - - if (argc > 0 && argv[0] != NULL) - handle_progname(argv[0]); + handle_argv(argc, argv, env); if (ps_strings != (struct ps_strings *)0) __ps_strings = ps_strings; |