aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/i386/dl-machine.h7
-rw-r--r--sysdeps/unix/sysv/linux/i386/dl-librecon.h10
2 files changed, 10 insertions, 7 deletions
diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h
index a6d8974ab3..87d924821a 100644
--- a/sysdeps/i386/dl-machine.h
+++ b/sysdeps/i386/dl-machine.h
@@ -227,9 +227,10 @@ _dl_start_user:\n\
leal (%esp,%eax,4), %esp\n\
# Push back the modified argument count.\n\
pushl %ecx\n\
- # Push _dl_default_scope[2] as argument in _dl_init_next call below.\n\
- movl _dl_default_scope@GOT(%ebx), %eax\n\
- movl 8(%eax), %esi\n\
+ # Push the searchlist of the main object as argument in\n\
+ # _dl_init_next call below.\n\
+ movl _dl_main_searchlist@GOT(%ebx), %eax\n\
+ movl (%eax), %esi\n\
0: movl %esi,%eax\n\
# Call _dl_init_next to return the address of an initializer\n\
# function to run.\n\
diff --git a/sysdeps/unix/sysv/linux/i386/dl-librecon.h b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
index b9ef9af8b6..4ae2e87a7b 100644
--- a/sysdeps/unix/sysv/linux/i386/dl-librecon.h
+++ b/sysdeps/unix/sysv/linux/i386/dl-librecon.h
@@ -27,14 +27,16 @@
/* We have to find out whether the binary is linked against \
libc 5 or glibc. We do this by looking at all the DT_NEEDED \
entries. If one is libc.so.5 this is a libc 5 linked binary. */ \
- if (main_map->l_info[DT_NEEDED]) \
+ if (_dl_loaded->l_info[DT_NEEDED]) \
{ \
/* We have dependencies. */ \
- const char *strtab = ((void *) main_map->l_addr \
- + main_map->l_info[DT_STRTAB]->d_un.d_ptr); \
const ElfW(Dyn) *d; \
+ const char *strtab; \
\
- for (d = main_map->l_ld; d->d_tag != DT_NULL; ++d) \
+ strtab = ((void *) _dl_loaded->l_addr \
+ + _dl_loaded->l_info[DT_STRTAB]->d_un.d_ptr); \
+ \
+ for (d = _dl_loaded->l_ld; d->d_tag != DT_NULL; ++d) \
if (d->d_tag == DT_NEEDED \
&& strcmp (strtab + d->d_un.d_val, "libc.so.5") == 0) \
break; \