1 /* The job of this fragment it to find argc and friends for INIT.
2 This is done in one of two ways: either in the stack context
3 of program start, or having dlopen pass them in. */
5 #define SYSDEP_CALL_INIT(NAME, INIT) \
6 void NAME (void *arg) \
10 /* The next variable is only here to work around a bug in gcc <= 2.7.2.1. \
11 If the address would be taken inside the expression the optimizer \
12 would try to be too smart and throws it away. Grrr. */ \
13 int *dummy_addr = &_dl_starting_up; \
15 __libc_multiple_libcs = dummy_addr && !_dl_starting_up; \
17 if (!__libc_multiple_libcs) \
20 argv = (char **) &arg + 1; \
21 envp = &argv[argc+1]; \
26 argv = ((char ***) &arg)[1]; \
27 envp = ((char ***) &arg)[2]; \
30 INIT (argc, argv, envp); \