summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2004-11-10 09:02:52 +0000
committerJakub Jelinek <jakub@redhat.com>2004-11-10 09:02:52 +0000
commit3504bb650f48534549bbd0313dc15fa71455e302 (patch)
tree742dd9cbcee1147fb36bcc02816bec415544597e /elf
parentcbf4bcd2b3d53de274548dbf4c28017d1f07d5b2 (diff)
Updated to fedora-glibc-20041110T0839
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-support.c7
-rw-r--r--elf/rtld.c8
2 files changed, 12 insertions, 3 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 88378a60a6..cfe01babbf 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -136,6 +136,8 @@ int (*_dl_make_stack_executable_hook) (void **) internal_function
#ifdef NEED_DL_SYSINFO
/* Needed for improved syscall handling on at least x86/Linux. */
uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT;
+#endif
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
/* Address of the ELF headers in the vsyscall page. */
const ElfW(Ehdr) *_dl_sysinfo_dso;
#endif
@@ -184,6 +186,11 @@ _dl_aux_init (ElfW(auxv_t) *av)
GL(dl_sysinfo) = av->a_un.a_val;
break;
#endif
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+ case AT_SYSINFO_EHDR:
+ GL(dl_sysinfo_dso) = av->a_un.a_ptr;
+ break;
+#endif
case AT_UID:
uid ^= av->a_un.a_val;
seen |= 1;
diff --git a/elf/rtld.c b/elf/rtld.c
index 4adbb437bf..e53273c2bb 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1382,7 +1382,7 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
assert (i == npreloads);
}
-#ifdef NEED_DL_SYSINFO
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
struct link_map *sysinfo_map = NULL;
if (GLRO(dl_sysinfo_dso) != NULL)
{
@@ -1446,9 +1446,11 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
}
/* We have a prelinked DSO preloaded by the system. */
+ sysinfo_map = l;
+# ifdef NEED_DL_SYSINFO
if (GLRO(dl_sysinfo) == DL_SYSINFO_DEFAULT)
GLRO(dl_sysinfo) = GLRO(dl_sysinfo_dso)->e_entry + l->l_addr;
- sysinfo_map = l;
+# endif
}
}
#endif
@@ -1497,7 +1499,7 @@ ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n",
GL(dl_rtld_map).l_next = (i + 1 < main_map->l_searchlist.r_nlist
? main_map->l_searchlist.r_list[i + 1]
: NULL);
-#ifdef NEED_DL_SYSINFO
+#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
if (sysinfo_map != NULL
&& GL(dl_rtld_map).l_prev->l_next == sysinfo_map
&& GL(dl_rtld_map).l_next != sysinfo_map)