git: d53b44084e66 - stable/12 - Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel supposedly having too many segments, when lld 11 links it. Such kernels should load just fine.

From: Ed Maste <emaste_at_FreeBSD.org>
Date: Fri, 14 Jan 2022 15:47:01 UTC
The branch stable/12 has been updated by emaste:

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

commit d53b44084e66e4d21bec7143f00a8677c90a09d2
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2020-08-20 18:50:46 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2022-01-14 15:45:14 +0000

    Bump kldxref's MAXSEGS to 16, to stop complaints about the kernel
    supposedly having too many segments, when lld 11 links it. Such kernels
    should load just fine.
    
    Note that we may still do some tweaking of our kernel linker scripts, to
    lower the number of segments, although the exact benefit is not entirely
    clear.
    
    PR:             252459
    
    (cherry picked from commit 05c312a339096ac54d404029ddfcd0114d452a4c)
---
 usr.sbin/kldxref/ef.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/kldxref/ef.c b/usr.sbin/kldxref/ef.c
index cad22b1d498e..736b7cab9279 100644
--- a/usr.sbin/kldxref/ef.c
+++ b/usr.sbin/kldxref/ef.c
@@ -49,7 +49,7 @@
 
 #include "ef.h"
 
-#define	MAXSEGS 3
+#define	MAXSEGS 16
 struct ef_file {
 	char		*ef_name;
 	struct elf_file *ef_efile;