3 /* Any use of __environ/environ will override this symbol. */
4 char **__dummy_environ = (void *)-1;
5 weak_alias(__dummy_environ, ___environ);
8 int (*main)(int, char **, char **), int argc, char **argv,
9 int (*init)(int, char **, char **), void (*fini)(void),
10 void (*ldso_fini)(void))
12 /* Save the environment if it may be used by libc/application */
13 char **envp = argv+argc+1;
14 if (___environ != (void *)-1) ___environ = envp;
16 /* Avoid writing 0 and triggering unnecessary COW */
17 if (ldso_fini) libc.ldso_fini = ldso_fini;
18 if (fini) libc.fini = fini;
20 /* Execute constructors (static) linked into the application */
21 if (init) init(argc, argv, envp);
23 /* Pass control to to application */
24 exit(main(argc, argv, envp));