Index: sys/kern/imgact_elf.c =================================================================== --- sys/kern/imgact_elf.c +++ sys/kern/imgact_elf.c @@ -1171,6 +1171,7 @@ goto ret; } sv = brand_info->sysvec; + sv->brand_info = brand_info; et_dyn_addr = 0; if (hdr->e_type == ET_DYN) { if ((brand_info->flags & BI_CAN_EXEC_DYN) == 0) { Index: sys/sys/imgact_elf.h =================================================================== --- sys/sys/imgact_elf.h +++ sys/sys/imgact_elf.h @@ -89,6 +89,7 @@ Elf_Brandnote *brand_note; boolean_t (*header_supported)(struct image_params *, int32_t *, uint32_t *); + /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ Index: sys/sys/sysent.h =================================================================== --- sys/sys/sysent.h +++ sys/sys/sysent.h @@ -150,6 +150,7 @@ void (*sv_ontdexit)(struct thread *td); int (*sv_setid_allowed)(struct thread *td, struct image_params *imgp); + void *brand_info; /* Elf_Brandinfo, NULL for non Elf binaries */ }; #define SV_ILP32 0x000100 /* 32-bit executable. */