Index: sys/arm/include/elf.h =================================================================== --- sys/arm/include/elf.h +++ sys/arm/include/elf.h @@ -87,8 +87,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ #define R_ARM_COUNT 33 /* Count of defined relocation types. */ Index: sys/arm64/include/elf.h =================================================================== --- sys/arm64/include/elf.h +++ sys/arm64/include/elf.h @@ -90,8 +90,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #define ELF_TARG_CLASS ELFCLASS64 Index: sys/kern/imgact_elf.c =================================================================== --- sys/kern/imgact_elf.c +++ sys/kern/imgact_elf.c @@ -972,6 +972,7 @@ elf_auxargs->base = addr; elf_auxargs->flags = 0; elf_auxargs->entry = entry; + elf_auxargs->e_flags = hdr->e_flags; imgp->auxargs = elf_auxargs; imgp->interpreted = 0; @@ -1002,6 +1003,7 @@ AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); + AUXARGS_ENTRY(pos, AT_E_FLAGS, args->e_flags); if (imgp->execpathp != 0) AUXARGS_ENTRY(pos, AT_EXECPATH, imgp->execpathp); AUXARGS_ENTRY(pos, AT_OSRELDATE, Index: sys/mips/include/elf.h =================================================================== --- sys/mips/include/elf.h +++ sys/mips/include/elf.h @@ -144,8 +144,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ #define ET_DYN_LOAD_ADDR 0x0120000 Index: sys/powerpc/include/elf.h =================================================================== --- sys/powerpc/include/elf.h +++ sys/powerpc/include/elf.h @@ -107,8 +107,10 @@ #define AT_PAGESIZESLEN 19 /* Number of pagesizes. */ #define AT_STACKPROT 21 /* Initial stack protection. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ +/* Unused 23 */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 23 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ /* * Relocation types. Index: sys/sparc64/include/elf.h =================================================================== --- sys/sparc64/include/elf.h +++ sys/sparc64/include/elf.h @@ -92,8 +92,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ /* Define "machine" characteristics */ #if __ELF_WORD_SIZE == 32 Index: sys/sys/imgact_elf.h =================================================================== --- sys/sys/imgact_elf.h +++ sys/sys/imgact_elf.h @@ -52,6 +52,7 @@ Elf_Size base; Elf_Size flags; Elf_Size entry; + Elf_Size e_flags; /* e_flags field from ehdr */ } __ElfN(Auxargs); typedef struct { Index: sys/x86/include/elf.h =================================================================== --- sys/x86/include/elf.h +++ sys/x86/include/elf.h @@ -100,8 +100,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ /* * Relocation types. @@ -185,8 +186,9 @@ #define AT_PAGESIZESLEN 21 /* Number of pagesizes. */ #define AT_TIMEKEEP 22 /* Pointer to timehands. */ #define AT_STACKPROT 23 /* Initial stack protection. */ +#define AT_E_FLAGS 24 /* e_flags field from elf hdr */ -#define AT_COUNT 24 /* Count of defined aux entry types. */ +#define AT_COUNT 25 /* Count of defined aux entry types. */ /* * Relocation types.