mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
elf: Avoid RELATIVE relocation for _dl_sysinfo
Set the default _dl_sysinfo in _dl_aux_init to avoid RELATIVE relocation in static PIE. This is needed for fixing bug 27072 on x86. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
parent
0ec583d926
commit
cabc8a2916
@ -193,8 +193,9 @@ int _dl_thread_gscope_count;
|
||||
struct dl_scope_free_list *_dl_scope_free_list;
|
||||
|
||||
#ifdef NEED_DL_SYSINFO
|
||||
/* Needed for improved syscall handling on at least x86/Linux. */
|
||||
uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT;
|
||||
/* Needed for improved syscall handling on at least x86/Linux. NB: Don't
|
||||
initialize it here to avoid RELATIVE relocation in static PIE. */
|
||||
uintptr_t _dl_sysinfo;
|
||||
#endif
|
||||
#ifdef NEED_DL_SYSINFO_DSO
|
||||
/* Address of the ELF headers in the vsyscall page. */
|
||||
@ -232,6 +233,11 @@ _dl_aux_init (ElfW(auxv_t) *av)
|
||||
uid_t uid = 0;
|
||||
gid_t gid = 0;
|
||||
|
||||
#ifdef NEED_DL_SYSINFO
|
||||
/* NB: Avoid RELATIVE relocation in static PIE. */
|
||||
GL(dl_sysinfo) = DL_SYSINFO_DEFAULT;
|
||||
#endif
|
||||
|
||||
_dl_auxv = av;
|
||||
for (; av->a_type != AT_NULL; ++av)
|
||||
switch (av->a_type)
|
||||
|
Loading…
Reference in New Issue
Block a user