diff options
author | Warner Losh <imp@bsdimp.com> | 2021-09-18 09:38:11 -0600 |
---|---|---|
committer | Warner Losh <imp@bsdimp.com> | 2021-10-18 12:51:39 -0600 |
commit | f6f0706cc2081ebaf786603aaaf204ae5a39dda7 (patch) | |
tree | 408dae33fa7bca99e7eef3d7c213f135cc38db3c /bsd-user | |
parent | 11170cbdcc64e4207850eb886baeb6db436aaf46 (diff) |
bsd-user/target_os_elf: If ELF_HWCAP2 is defined, publish it
Some architectures publish AT_HWCAP2 as well as AT_HWCAP. Those
architectures will define ELF_HWCAP2 in their target_arch_elf.h files
for the value for this process. If it is defined, then publish it.
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kyle Evans <kevans@FreeBSD.org>
Diffstat (limited to 'bsd-user')
-rw-r--r-- | bsd-user/freebsd/target_os_elf.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bsd-user/freebsd/target_os_elf.h b/bsd-user/freebsd/target_os_elf.h index adcffd1ddb..e5ac8e8e50 100644 --- a/bsd-user/freebsd/target_os_elf.h +++ b/bsd-user/freebsd/target_os_elf.h @@ -112,6 +112,10 @@ static abi_ulong target_create_elf_tables(abi_ulong p, int argc, int envc, NEW_AUX_ENT(AT_ENTRY, load_bias + exec->e_entry); features = ELF_HWCAP; NEW_AUX_ENT(FREEBSD_AT_HWCAP, features); +#ifdef ELF_HWCAP2 + features = ELF_HWCAP2; + NEW_AUX_ENT(FREEBSD_AT_HWCAP2, features); +#endif NEW_AUX_ENT(AT_UID, (abi_ulong)getuid()); NEW_AUX_ENT(AT_EUID, (abi_ulong)geteuid()); NEW_AUX_ENT(AT_GID, (abi_ulong)getgid()); |