* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Define
_dl_sysinfo_dso under [NEED_DL_SYSINFO_DSO] as well. * elf/rtld.c (dl_main): Set up GLRO(dl_sysinfo_dso) under [NEED_DL_SYSINFO_DSO] as well. * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Always include AT_SYSINFO and AT_SYSINFO_EHDR in name table. (_dl_sysdep_start) [NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR. * elf/dl-support.c (_dl_sysinfo_dso): Define also under [NEED_DL_SYSINFO_DSO]. (_dl_aux_init) [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR and set GL(dl_sysinfo_dso). 2004-11-05 Roland McGrath <roland@redhat.com>
This commit is contained in:
parent
c3047bca73
commit
30e32d23eb
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2004-11-05 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Define
|
||||
_dl_sysinfo_dso under [NEED_DL_SYSINFO_DSO] as well.
|
||||
* elf/rtld.c (dl_main): Set up GLRO(dl_sysinfo_dso) under
|
||||
[NEED_DL_SYSINFO_DSO] as well.
|
||||
* sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Always include
|
||||
AT_SYSINFO and AT_SYSINFO_EHDR in name table.
|
||||
(_dl_sysdep_start) [NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR.
|
||||
* elf/dl-support.c (_dl_sysinfo_dso): Define also under
|
||||
[NEED_DL_SYSINFO_DSO].
|
||||
(_dl_aux_init) [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO]:
|
||||
Match AT_SYSINFO_EHDR and set GL(dl_sysinfo_dso).
|
||||
|
||||
2004-11-05 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* manual/errno.texi (Error Codes): Revert last change for now.
|
||||
|
@ -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
|
||||
@ -183,6 +185,11 @@ _dl_aux_init (ElfW(auxv_t) *av)
|
||||
case AT_SYSINFO:
|
||||
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;
|
||||
|
@ -1274,7 +1274,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)
|
||||
{
|
||||
@ -1338,9 +1338,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
|
||||
@ -1389,7 +1391,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)
|
||||
|
@ -161,6 +161,8 @@ _dl_sysdep_start (void **start_argptr,
|
||||
case AT_SYSINFO:
|
||||
new_sysinfo = av->a_un.a_val;
|
||||
break;
|
||||
#endif
|
||||
#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
|
||||
case AT_SYSINFO_EHDR:
|
||||
GLRO(dl_sysinfo_dso) = av->a_un.a_ptr;
|
||||
break;
|
||||
@ -287,10 +289,8 @@ _dl_show_auxv (void)
|
||||
[AT_UCACHEBSIZE - 2] = { "AT_UCACHEBSIZE: 0x", hex },
|
||||
[AT_IGNOREPPC - 2] = { "AT_IGNOREPPC", ignore },
|
||||
[AT_SECURE - 2] = { "AT_SECURE: ", dec },
|
||||
#ifdef NEED_DL_SYSINFO
|
||||
[AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex },
|
||||
[AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex },
|
||||
#endif
|
||||
};
|
||||
unsigned int idx = (unsigned int) (av->a_type - 2);
|
||||
|
||||
|
@ -470,7 +470,9 @@ struct rtld_global_ro
|
||||
#ifdef NEED_DL_SYSINFO
|
||||
/* Syscall handling improvements. This is very specific to x86. */
|
||||
EXTERN uintptr_t _dl_sysinfo;
|
||||
#endif
|
||||
|
||||
#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
|
||||
/* The vsyscall page is a virtual DSO pre-mapped by the kernel.
|
||||
This points to its ELF header. */
|
||||
EXTERN const ElfW(Ehdr) *_dl_sysinfo_dso;
|
||||
|
Loading…
x
Reference in New Issue
Block a user