mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Fix crash on getauxval call without HAVE_AUX_VECTOR
* sysdeps/generic/ldsodefs.h (struct rtld_global_ro) [!HAVE_AUX_VECTOR]: Do not define _dl_auxv field. * misc/getauxval.c (__getauxval) [!HAVE_AUX_VECTOR]: Do not go through GLRO(dl_auxv) list.
This commit is contained in:
@ -30,9 +30,11 @@ __getauxval (unsigned long int type)
|
||||
else if (type == AT_HWCAP2)
|
||||
return GLRO(dl_hwcap2);
|
||||
|
||||
#ifdef HAVE_AUX_VECTOR
|
||||
for (p = GLRO(dl_auxv); p->a_type != AT_NULL; p++)
|
||||
if (p->a_type == type)
|
||||
return p->a_un.a_val;
|
||||
#endif
|
||||
|
||||
__set_errno (ENOENT);
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user