git: ef03c60246be - main - kern_mib: remove kern.fallback_elf_brand compat sysctl

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Mon, 31 Aug 2026 17:34:17 UTC
The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=ef03c60246be23e601c4d08bfd2682f51825f18e

commit ef03c60246be23e601c4d08bfd2682f51825f18e
Author:     Christos Longros <chris.longros@gmail.com>
AuthorDate: 2026-08-31 17:23:19 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-08-31 17:23:53 +0000

    kern_mib: remove kern.fallback_elf_brand compat sysctl
    
    This compatibility alias for kern.elf{32,64}.fallback_brand has been
    marked for removal since FreeBSD 6.0.
    
    Signed-off-by: Christos Longros <chris.longros@gmail.com>
    
    Reviewed by:    kib, emaste
    Differential Revision:  https://reviews.freebsd.org/D56085
---
 sys/kern/imgact_elf.c            | 2 +-
 sys/kern/kern_mib.c              | 6 ------
 sys/sys/imgact_elf.h             | 1 -
 tools/tools/sysdoc/tunables.mdoc | 3 ---
 4 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c
index b8a0e439de5c..c2be0a6706f6 100644
--- a/sys/kern/imgact_elf.c
+++ b/sys/kern/imgact_elf.c
@@ -116,7 +116,7 @@ SYSCTL_NODE(_kern, OID_AUTO, ELF_ABI_ID, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
 
 #define	ELF_NODE_OID	__CONCAT(_kern_, ELF_ABI_ID)
 
-int __elfN(fallback_brand) = -1;
+static int __elfN(fallback_brand) = -1;
 SYSCTL_INT(ELF_NODE_OID, OID_AUTO,
     fallback_brand, CTLFLAG_RWTUN, &__elfN(fallback_brand), 0,
     ELF_ABI_NAME " brand of last resort");
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index ebee2e88bd66..04f5270e28a8 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -777,9 +777,3 @@ SYSCTL_SIZEOF_STRUCT(kinfo_proc);
 const int pcb_size = sizeof(struct pcb);
 SYSCTL_SIZEOF_STRUCT(pcb);
 
-/* XXX compatibility, remove for 6.0 */
-#include <sys/imgact.h>
-#include <sys/imgact_elf.h>
-SYSCTL_INT(_kern, OID_AUTO, fallback_elf_brand, CTLFLAG_RW,
-    &__elfN(fallback_brand), sizeof(__elfN(fallback_brand)),
-    "compatibility for kern.fallback_elf_brand");
diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h
index 25ce7871ba7c..57b2a5f6ff55 100644
--- a/sys/sys/imgact_elf.h
+++ b/sys/sys/imgact_elf.h
@@ -131,7 +131,6 @@ bool	__elfN(parse_notes)(const struct image_params *, const Elf_Note *,
 /* Machine specific function to dump per-thread information. */
 void	__elfN(dump_thread)(struct thread *, void *, size_t *);
 
-extern int __elfN(fallback_brand);
 extern const Elf_Brandnote __elfN(freebsd_brandnote);
 extern const Elf_Brandnote __elfN(kfreebsd_brandnote);
 #endif /* _KERNEL */
diff --git a/tools/tools/sysdoc/tunables.mdoc b/tools/tools/sysdoc/tunables.mdoc
index 397fe632322d..8ec259da783f 100644
--- a/tools/tools/sysdoc/tunables.mdoc
+++ b/tools/tools/sysdoc/tunables.mdoc
@@ -687,9 +687,6 @@ time after modem resets.
 ---
 kern.elf32.fallback_brand
 
----
-kern.fallback_elf_brand
-
 ---
 kern.file
 struct