diff options
Diffstat (limited to 'elf')
-rw-r--r-- | elf/ldconfig.c | 4 | ||||
-rw-r--r-- | elf/rtld.c | 20 |
2 files changed, 22 insertions, 2 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c index b7ac488..2a24a17 100644 --- a/elf/ldconfig.c +++ b/elf/ldconfig.c @@ -1117,12 +1117,12 @@ main (int argc, char **argv) if (!opt_only_cline) { + parse_conf (config_file); + /* Always add the standard search paths. */ add_system_dir (SLIBDIR); if (strcmp (SLIBDIR, LIBDIR)) add_system_dir (LIBDIR); - - parse_conf (config_file); } search_dirs (); @@ -588,6 +588,20 @@ _dl_initial_error_catch_tsd (void) } #endif +#if defined SHARED && defined _LIBC_REENTRANT \ + && defined __rtld_lock_default_lock_recursive +static void rtld_lock_default_lock_recursive (void *lock) +{ + __rtld_lock_default_lock_recursive (lock); +} + +static void rtld_lock_default_unlock_recursive (void *lock) +{ + __rtld_lock_default_unlock_recursive (lock); +} +#endif + + static const char *library_path; /* The library search path. */ static const char *preloadlist; /* The list preloaded objects. */ static int version_info; /* Nonzero if information about @@ -626,6 +640,12 @@ dl_main (const ElfW(Phdr) *phdr, GL(dl_init_static_tls) = &_dl_nothread_init_static_tls; #endif +#if defined SHARED && defined _LIBC_REENTRANT \ + && defined __rtld_lock_default_lock_recursive + GL(dl_rtld_lock_recursive) = rtld_lock_default_lock_recursive; + GL(dl_rtld_unlock_recursive) = rtld_lock_default_unlock_recursive; +#endif + /* Process the environment variable which control the behaviour. */ process_envvars (&mode); |