From bf244ee81f5faa7c84ec3d337ea41a8c46f94497 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 1 Apr 2004 08:55:15 +0000 Subject: (_dl_show_auxv): Add handling for ignored entries. Ignore AT_IGNOREPPC. --- sysdeps/generic/dl-sysdep.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/dl-sysdep.c b/sysdeps/generic/dl-sysdep.c index 51f301490d..429947ccd9 100644 --- a/sysdeps/generic/dl-sysdep.c +++ b/sysdeps/generic/dl-sysdep.c @@ -262,7 +262,7 @@ _dl_show_auxv (void) static const struct { const char label[20]; - enum { unused, dec, hex, str } form; + enum { unknown = 0, dec, hex, str, ignore } form; } auxvars[] = { [AT_EXECFD - 2] = { "AT_EXECFD: ", dec }, @@ -285,14 +285,18 @@ _dl_show_auxv (void) [AT_DCACHEBSIZE - 2] = { "AT_DCACHEBSIZE: 0x", hex }, [AT_ICACHEBSIZE - 2] = { "AT_ICACHEBSIZE: 0x", hex }, [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 - [AT_SECURE - 2] = { "AT_SECURE: ", dec }, }; unsigned int idx = (unsigned int) (av->a_type - 2); + if ((unsigned int) av->a_type < 2u || auxvars[idx].form == ignore) + continue; + assert (AT_NULL == 0); assert (AT_IGNORE == 1); @@ -304,7 +308,7 @@ _dl_show_auxv (void) } if (idx < sizeof (auxvars) / sizeof (auxvars[0]) - && auxvars[idx].form != unused) + && auxvars[idx].form != unknown) { const char *val = av->a_un.a_ptr; -- cgit 1.4.1