about summary refs log tree commit diff
path: root/src/env
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-07-27 00:14:57 -0400
committerRich Felker <dalias@aerifal.cx>2012-07-27 00:14:57 -0400
commite1b9c1b01be294cc2865acfe33544d5e5cc50eb4 (patch)
treeb3efaa1aa0c3ec7ce04dd43bc5c02bd1f26f6c1c /src/env
parent07e62953c768f9f09485388c22ffaed98d11d676 (diff)
downloadmusl-e1b9c1b01be294cc2865acfe33544d5e5cc50eb4.tar.gz
musl-e1b9c1b01be294cc2865acfe33544d5e5cc50eb4.tar.xz
musl-e1b9c1b01be294cc2865acfe33544d5e5cc50eb4.zip
save AT_HWCAP from auxv for subsequent use in machine-specific code
it's expected that this will be needed/useful only in asm, so I've
given it its own symbol that can be addressed in pc-relative ways from
asm rather than adding a field in the __libc structure which would
require hard-coding the offset wherever it's used.
Diffstat (limited to 'src/env')
-rw-r--r--src/env/__init_security.c1
1 files changed, 1 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;