diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -165,8 +165,8 @@ } static bool -freebsd_brand_info_la57_img_compat(struct image_params *imgp, - int32_t *osrel __unused, uint32_t *fctl0) +freebsd_brand_info_la57_img_compat(const struct image_params *imgp, + const int32_t *osrel __unused, const uint32_t *fctl0) { if ((imgp->proc->p_md.md_flags & P_MD_LA57) != 0) return (true); diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -54,8 +54,8 @@ #include "opt_global.h" /* for OPT_KDTRACE_HOOKS */ #include "opt_stack.h" /* for OPT_STACK */ -static bool elf32_arm_abi_supported(struct image_params *, int32_t *, - uint32_t *); +static bool elf32_arm_abi_supported(const struct image_params *, + const int32_t *, const uint32_t *); u_long elf_hwcap; u_long elf_hwcap2; @@ -121,8 +121,8 @@ &freebsd_brand_info); static bool -elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, - uint32_t *fctl0 __unused) +elf32_arm_abi_supported(const struct image_params *imgp, + const int32_t *osrel __unused, const uint32_t *fctl0 __unused) { const Elf_Ehdr *hdr = (const Elf_Ehdr *)imgp->image_header; diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -76,8 +76,8 @@ u_long stack); static void freebsd32_set_syscall_retval(struct thread *, int); -static bool elf32_arm_abi_supported(struct image_params *, int32_t *, - uint32_t *); +static bool elf32_arm_abi_supported(const struct image_params *, + const int32_t *, const uint32_t *); static void elf32_fixlimit(struct rlimit *rl, int which); extern void freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); @@ -167,8 +167,8 @@ SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_FIRST, register_elf32_brand, NULL); static bool -elf32_arm_abi_supported(struct image_params *imgp, int32_t *osrel __unused, - uint32_t *fctl0 __unused) +elf32_arm_abi_supported(const struct image_params *imgp, + const int32_t *osrel __unused, const uint32_t *fctl0 __unused) { const Elf32_Ehdr *hdr; diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -145,10 +145,10 @@ .sv_regset_end = SET_LIMIT(__elfN(regset)), }; -static bool ppc64_elfv1_header_match(struct image_params *params, - int32_t *, uint32_t *); -static bool ppc64_elfv2_header_match(struct image_params *params, - int32_t *, uint32_t *); +static bool ppc64_elfv1_header_match(const struct image_params *params, + const int32_t *, const uint32_t *); +static bool ppc64_elfv2_header_match(const struct image_params *params, + const int32_t *, const uint32_t *); static Elf64_Brandinfo freebsd_brand_info_elfv1 = { .brand = ELFOSABI_FREEBSD, @@ -221,8 +221,8 @@ SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); static bool -ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, - uint32_t *fctl0 __unused) +ppc64_elfv1_header_match(const struct image_params *params, + const int32_t *osrel __unused, const uint32_t *fctl0 __unused) { const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; int abi = (hdr->e_flags & 3); @@ -231,8 +231,8 @@ } static bool -ppc64_elfv2_header_match(struct image_params *params, int32_t *osrel __unused, - uint32_t *fctl0 __unused) +ppc64_elfv2_header_match(const struct image_params *params, + const int32_t *osrel __unused, const uint32_t *fctl0 __unused) { const Elf64_Ehdr *hdr = (const Elf64_Ehdr *)params->image_header; int abi = (hdr->e_flags & 3); diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -86,8 +86,8 @@ const char *interp_newpath; int flags; Elf_Brandnote *brand_note; - bool (*header_supported)(struct image_params *, - int32_t *, uint32_t *); + bool (*header_supported)(const struct image_params *, + const int32_t *, const 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. */