diff options
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/ldso/dl-elf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 55ff31e4f..02e59a349 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -174,8 +174,11 @@ search_for_named_library(const char *name, unsigned rflags, const char *path_lis _dl_strcpy(mylibname, "."); /* Assume current dir if empty path */ _dl_strcat(mylibname, "/"); _dl_strcat(mylibname, name); - if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL) - return tpnt; +#ifdef __LDSO_SAFE_RUNPATH__ + if (*mylibname == '/') +#endif + if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL) + return tpnt; path_n = path+1; } path++; |