diff options
Diffstat (limited to 'sysdeps/generic')
-rw-r--r-- | sysdeps/generic/ldsodefs.h | 9 | ||||
-rw-r--r-- | sysdeps/generic/libc-start.c | 10 |
2 files changed, 9 insertions, 10 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index bcc74b3ab2..bc4ece2a7e 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -354,11 +354,10 @@ extern int _dl_check_all_versions (struct link_map *map, int verbose) extern int _dl_check_map_versions (struct link_map *map, int verbose) internal_function; -/* Return the address of the next initializer function for SCOPE or one of - its dependencies that has not yet been run. When there are no more - initializers to be run, this returns zero. The functions are returned - in the order they should be called. */ -extern ElfW(Addr) _dl_init_next (struct r_scope_elem *scope) internal_function; +/* Initialize the object in SCOPE by calling the constructors with + ARGC, ARGV, and ENV as the parameters. */ +extern void _dl_init (struct link_map *main_map, int argc, char **argv, + char **env) internal_function; /* Call the finalizer functions of all shared objects whose initializer functions have completed. */ diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c index bcb3cf3f2d..e3960ca818 100644 --- a/sysdeps/generic/libc-start.c +++ b/sysdeps/generic/libc-start.c @@ -63,12 +63,12 @@ __libc_start_main (int (*main) (int, char **, char **), int argc, if (rtld_fini != NULL) atexit (rtld_fini); - /* Call the initializer of the libc. */ -#ifdef PIC - if (_dl_debug_impcalls) - _dl_debug_message (1, "\ninitialize libc\n\n", NULL); -#endif + /* Call the initializer of the libc. This is only needed here if we + are compiling for the static library in which case we haven't + run the constructors in `_dl_start_user'. */ +#ifndef PIC __libc_init_first (argc, argv, __environ); +#endif /* Register the destructor of the program, if any. */ if (fini) |