summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRyan S. Arnold <rsa@linux.vnet.ibm.com>2013-06-28 16:50:48 -0500
committerRyan S. Arnold <rsa@linux.vnet.ibm.com>2013-06-28 16:50:48 -0500
commit1ae8bfe07c1ab2444cc1d186321ff1431a1b9f96 (patch)
treef7a784d6c5727eb0b1c0209a77db2ad99a36d92d /elf
parent8fbec010989a242f6eb17be837255502c459977d (diff)
Add GLRO(dl_hwcap2) for new AT_HWCAP2 auxv_t a_type.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-support.c4
-rw-r--r--elf/dl-sysdep.c10
2 files changed, 11 insertions, 3 deletions
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 76752f33f3..5a082feb7a 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -165,6 +165,7 @@ ElfW(auxv_t) *_dl_auxv;
const ElfW(Phdr) *_dl_phdr;
size_t _dl_phnum;
uint64_t _dl_hwcap __attribute__ ((nocommon));
+uint64_t _dl_hwcap2 __attribute__ ((nocommon));
/* This is not initialized to HWCAP_IMPORTANT, matching the definition
of _dl_important_hwcaps, below, where no hwcap strings are ever
@@ -249,6 +250,9 @@ _dl_aux_init (ElfW(auxv_t) *av)
case AT_HWCAP:
GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
break;
+ case AT_HWCAP2:
+ GLRO(dl_hwcap2) = (unsigned long int) av->a_un.a_val;
+ break;
#ifdef NEED_DL_SYSINFO
case AT_SYSINFO:
GL(dl_sysinfo) = av->a_un.a_val;
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 52de23f44b..08c74ef83b 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -156,6 +156,9 @@ _dl_sysdep_start (void **start_argptr,
case AT_HWCAP:
GLRO(dl_hwcap) = (unsigned long int) av->a_un.a_val;
break;
+ case AT_HWCAP2:
+ GLRO(dl_hwcap2) = (unsigned long int) av->a_un.a_val;
+ break;
case AT_CLKTCK:
GLRO(dl_clktck) = av->a_un.a_val;
break;
@@ -303,6 +306,7 @@ _dl_show_auxv (void)
[AT_SYSINFO - 2] = { "SYSINFO: 0x", hex },
[AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex },
[AT_RANDOM - 2] = { "RANDOM: 0x", hex },
+ [AT_HWCAP2 - 2] = { "HWCAP2: 0x", hex },
};
unsigned int idx = (unsigned int) (av->a_type - 2);
@@ -314,10 +318,10 @@ _dl_show_auxv (void)
assert (AT_NULL == 0);
assert (AT_IGNORE == 1);
- if (av->a_type == AT_HWCAP)
+ if (av->a_type == AT_HWCAP || av->a_type == AT_HWCAP2)
{
- /* This is handled special. */
- if (_dl_procinfo (av->a_un.a_val) == 0)
+ /* These are handled in a special way per platform. */
+ if (_dl_procinfo (av->a_type, av->a_un.a_val) == 0)
continue;
}