elf: Catch up with defining EF_ARM_EABI_VERSION in elf_common.h

FreeBSD defines EF_ARM_EABI_VERSION in a non-standard way (at least
differently than everybody else). We use this only in elf*machdep.c to
make sure the image is new enough. Switch to the more standard way of
defining this and adjust other constants to match.

Fixes:			c52c98e69a
Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2023-01-20 19:15:52 -07:00
parent c52c98e69a
commit 34784d17eb
2 changed files with 2 additions and 4 deletions

View file

@ -74,9 +74,8 @@ __ElfType(Auxinfo);
#define ELF_TARG_VER 1
/* Defines specific for arm headers */
#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24)
#define EF_ARM_EABI_VERSION_UNKNOWN 0
#define EF_ARM_EABI_FREEBSD_MIN 4
#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4
#define ET_DYN_LOAD_ADDR 0x01001000

View file

@ -152,8 +152,7 @@ elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused,
ID_AA64PFR0_EL0_64_32)
return (FALSE);
#define EF_ARM_EABI_VERSION(x) (((x) & EF_ARM_EABIMASK) >> 24)
#define EF_ARM_EABI_FREEBSD_MIN 4
#define EF_ARM_EABI_FREEBSD_MIN EF_ARM_EABI_VER4
hdr = (const Elf32_Ehdr *)imgp->image_header;
if (EF_ARM_EABI_VERSION(hdr->e_flags) < EF_ARM_EABI_FREEBSD_MIN) {
if (bootverbose)