about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/env/__init_security.c1
-rw-r--r--src/internal/libc.c2
-rw-r--r--src/internal/libc.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/env/__init_security.c b/src/env/__init_security.c
index 59d546fa..f9de9c62 100644
--- a/src/env/__init_security.c
+++ b/src/env/__init_security.c
@@ -23,6 +23,7 @@ void __init_security(size_t *auxv)
 #endif
 
 	for (; auxv[0]; auxv+=2) if (auxv[0]<AUX_CNT) aux[auxv[0]] = auxv[1];
+	__hwcap = aux[AT_HWCAP];
 	if (aux[AT_UID]==aux[AT_EUID] && aux[AT_GID]==aux[AT_EGID]
 		&& !aux[AT_SECURE]) return;
 
diff --git a/src/internal/libc.c b/src/internal/libc.c
index c1e21ca0..004c1a33 100644
--- a/src/internal/libc.c
+++ b/src/internal/libc.c
@@ -13,3 +13,5 @@ struct __libc __libc;
 #ifdef BROKEN_VISIBILITY
 __asm__(".hidden __libc");
 #endif
+
+size_t __hwcap;
diff --git a/src/internal/libc.h b/src/internal/libc.h
index 53e4e826..ea863d67 100644
--- a/src/internal/libc.h
+++ b/src/internal/libc.h
@@ -18,6 +18,7 @@ struct __libc {
 	int ofl_lock[2];
 };
 
+extern size_t __hwcap;
 
 #if !defined(__PIC__) || 100*__GNUC__+__GNUC_MINOR__ >= 303 || defined(__PCC__) || defined(__TINYC__)