From 0cdc5e930a95ca2ec3f2fd9327da93a2fbaf8e97 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 10 Apr 2016 23:58:43 +0200 Subject: 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. --- sysdeps/generic/ldsodefs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h index 2733ac8268..ddec0be12c 100644 --- a/sysdeps/generic/ldsodefs.h +++ b/sysdeps/generic/ldsodefs.h @@ -509,8 +509,10 @@ struct rtld_global_ro /* Mask for important hardware capabilities we honour. */ EXTERN uint64_t _dl_hwcap_mask; +#ifdef HAVE_AUX_VECTOR /* Pointer to the auxv list supplied to the program at startup. */ EXTERN ElfW(auxv_t) *_dl_auxv; +#endif /* Get architecture specific definitions. */ #define PROCINFO_DECL -- cgit v1.2.3