diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-03-14 18:33:58 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-03-14 18:33:58 +0000 |
commit | f53713a8e729c441aef2b4ccc7562306fc306fbe (patch) | |
tree | aadba8c6486faec8084938212a784bc3ec3660ca /elf | |
parent | f81ce2888d6dfe48dcdf82fdb42f4ed8081b70bc (diff) | |
download | glibc-f53713a8e729c441aef2b4ccc7562306fc306fbe.tar.gz glibc-f53713a8e729c441aef2b4ccc7562306fc306fbe.tar.xz glibc-f53713a8e729c441aef2b4ccc7562306fc306fbe.zip |
* elf/dl-sysdep.c (_dl_show_auxv): Add support for AT_BASE_PLATFORM.
* elf/dl-sysdep.c (auxvars): Compress data structure.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-sysdep.c | 59 |
1 files changed, 30 insertions, 29 deletions
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c index a44bee7086..db1001253c 100644 --- a/elf/dl-sysdep.c +++ b/elf/dl-sysdep.c @@ -269,36 +269,37 @@ _dl_show_auxv (void) { static const struct { - const char label[20]; - enum { unknown = 0, dec, hex, str, ignore } form; + const char label[17]; + enum { unknown = 0, dec, hex, str, ignore } form : 8; } auxvars[] = { - [AT_EXECFD - 2] = { "AT_EXECFD: ", dec }, - [AT_EXECFN - 2] = { "AT_EXECFN: ", str }, - [AT_PHDR - 2] = { "AT_PHDR: 0x", hex }, - [AT_PHENT - 2] = { "AT_PHENT: ", dec }, - [AT_PHNUM - 2] = { "AT_PHNUM: ", dec }, - [AT_PAGESZ - 2] = { "AT_PAGESZ: ", dec }, - [AT_BASE - 2] = { "AT_BASE: 0x", hex }, - [AT_FLAGS - 2] = { "AT_FLAGS: 0x", hex }, - [AT_ENTRY - 2] = { "AT_ENTRY: 0x", hex }, - [AT_NOTELF - 2] = { "AT_NOTELF: ", hex }, - [AT_UID - 2] = { "AT_UID: ", dec }, - [AT_EUID - 2] = { "AT_EUID: ", dec }, - [AT_GID - 2] = { "AT_GID: ", dec }, - [AT_EGID - 2] = { "AT_EGID: ", dec }, - [AT_PLATFORM - 2] = { "AT_PLATFORM: ", str }, - [AT_HWCAP - 2] = { "AT_HWCAP: ", hex }, - [AT_CLKTCK - 2] = { "AT_CLKTCK: ", dec }, - [AT_FPUCW - 2] = { "AT_FPUCW: ", hex }, - [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 }, - [AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex }, - [AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex }, - [AT_RANDOM - 2] = { "AT_RANDOM: 0x", hex }, + [AT_EXECFD - 2] = { "EXECFD: ", dec }, + [AT_EXECFN - 2] = { "EXECFN: ", str }, + [AT_PHDR - 2] = { "PHDR: 0x", hex }, + [AT_PHENT - 2] = { "PHENT: ", dec }, + [AT_PHNUM - 2] = { "PHNUM: ", dec }, + [AT_PAGESZ - 2] = { "PAGESZ: ", dec }, + [AT_BASE - 2] = { "BASE: 0x", hex }, + [AT_FLAGS - 2] = { "FLAGS: 0x", hex }, + [AT_ENTRY - 2] = { "ENTRY: 0x", hex }, + [AT_NOTELF - 2] = { "NOTELF: ", hex }, + [AT_UID - 2] = { "UID: ", dec }, + [AT_EUID - 2] = { "EUID: ", dec }, + [AT_GID - 2] = { "GID: ", dec }, + [AT_EGID - 2] = { "EGID: ", dec }, + [AT_PLATFORM - 2] = { "PLATFORM: ", str }, + [AT_HWCAP - 2] = { "HWCAP: ", hex }, + [AT_CLKTCK - 2] = { "CLKTCK: ", dec }, + [AT_FPUCW - 2] = { "FPUCW: ", hex }, + [AT_DCACHEBSIZE - 2] = { "DCACHEBSIZE: 0x", hex }, + [AT_ICACHEBSIZE - 2] = { "ICACHEBSIZE: 0x", hex }, + [AT_UCACHEBSIZE - 2] = { "UCACHEBSIZE: 0x", hex }, + [AT_IGNOREPPC - 2] = { "IGNOREPPC", ignore }, + [AT_SECURE - 2] = { "SECURE: ", dec }, + [AT_BASE_PLATFORM - 2] = { "BASE_PLATFORM:", str }, + [AT_SYSINFO - 2] = { "SYSINFO: 0x", hex }, + [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex }, + [AT_RANDOM - 2] = { "RANDOM: 0x", hex }, }; unsigned int idx = (unsigned int) (av->a_type - 2); @@ -327,7 +328,7 @@ _dl_show_auxv (void) val = _itoa ((unsigned long int) av->a_un.a_val, buf + sizeof buf - 1, 16, 0); - _dl_printf ("%s%s\n", auxvars[idx].label, val); + _dl_printf ("AT_%s%s\n", auxvars[idx].label, val); continue; } |