return true;
}
-#define ELF_HWCAP2 get_elf_hwcap2(thread_cpu)
-
#define ELF_PLATFORM get_elf_platform()
static const char *get_elf_platform(void)
#define USE_ELF_CORE_DUMP
#define ELF_EXEC_PAGESIZE 4096
-#define ELF_HWCAP2 get_elf_hwcap2(thread_cpu)
-
#if TARGET_BIG_ENDIAN
# define VDSO_HEADER "vdso-be.c.inc"
#else
#define ELF_ARCH EM_PPC
-#define ELF_HWCAP2 get_elf_hwcap2(thread_cpu)
-
/*
* The requirements here are:
* - keep the final alignment of sp (sp & 0xf)
#ifndef HAVE_ELF_HWCAP
abi_ulong get_elf_hwcap(CPUState *cs) { return 0; }
#endif
+#ifndef HAVE_ELF_HWCAP2
+abi_ulong get_elf_hwcap2(CPUState *cs) { g_assert_not_reached(); }
+#define HAVE_ELF_HWCAP2 0
+#endif
#include "elf.h"
#ifdef DLINFO_ARCH_ITEMS
size += DLINFO_ARCH_ITEMS * 2;
#endif
-#ifdef ELF_HWCAP2
- size += 2;
-#endif
+ if (HAVE_ELF_HWCAP2) {
+ size += 2;
+ }
info->auxv_len = size * n;
size += envc + argc + 2;
NEW_AUX_ENT(AT_SECURE, (abi_ulong) qemu_getauxval(AT_SECURE));
NEW_AUX_ENT(AT_EXECFN, info->file_string);
-#ifdef ELF_HWCAP2
- NEW_AUX_ENT(AT_HWCAP2, (abi_ulong) ELF_HWCAP2);
-#endif
-
+ if (HAVE_ELF_HWCAP2) {
+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
+ }
if (u_base_platform) {
NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
}