|
@@ -296,11 +296,10 @@ static ptrdiff_t _dl_build_local_scope (struct elf_resolve **list,
|
|
return p - list;
|
|
return p - list;
|
|
}
|
|
}
|
|
|
|
|
|
-static void *do_dlopen(const char *libname, int flag)
|
|
+static void *do_dlopen(const char *libname, int flag, ElfW(Addr) from)
|
|
{
|
|
{
|
|
struct elf_resolve *tpnt, *tfrom;
|
|
struct elf_resolve *tpnt, *tfrom;
|
|
struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle;
|
|
struct dyn_elf *dyn_chain, *rpnt = NULL, *dyn_ptr, *relro_ptr, *handle;
|
|
- ElfW(Addr) from;
|
|
|
|
struct elf_resolve *tpnt1;
|
|
struct elf_resolve *tpnt1;
|
|
void (*dl_brk) (void);
|
|
void (*dl_brk) (void);
|
|
int now_flag;
|
|
int now_flag;
|
|
@@ -320,8 +319,6 @@ static void *do_dlopen(const char *libname, int flag)
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
|
|
|
|
- from = (ElfW(Addr)) __builtin_return_address(0);
|
|
|
|
-
|
|
|
|
if (!_dl_init) {
|
|
if (!_dl_init) {
|
|
_dl_init = true;
|
|
_dl_init = true;
|
|
_dl_malloc_function = malloc;
|
|
_dl_malloc_function = malloc;
|
|
@@ -661,7 +658,8 @@ void *dlopen(const char *libname, int flag)
|
|
void *ret;
|
|
void *ret;
|
|
|
|
|
|
__UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1);
|
|
__UCLIBC_MUTEX_CONDITIONAL_LOCK(_dl_mutex, 1);
|
|
- ret = do_dlopen(libname, flag);
|
|
+ ret = do_dlopen(libname, flag,
|
|
|
|
+ (ElfW(Addr)) __builtin_return_address(0));
|
|
__UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1);
|
|
__UCLIBC_MUTEX_CONDITIONAL_UNLOCK(_dl_mutex, 1);
|
|
|
|
|
|
return ret;
|
|
return ret;
|