kern/96429: kern_linker.c hardcodes "/boot/kernel" instead of using KODIR

Robert Millan rmh at
Thu Apr 27 19:30:16 UTC 2006

>Number:         96429
>Category:       kern
>Synopsis:       kern_linker.c hardcodes "/boot/kernel" instead of using KODIR
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 27 19:30:11 GMT 2006
>Originator:     Robert Millan
>Release:        GNU/kFreeBSD 5.4-1-586 i586
System: GNU/kFreeBSD 5.4-1-586 #0 Mon Dec 5 19:45:10 CET 2005 i586 i386 AMD-K6(tm) 3D processor GNU/kFreeBSD
Architecture: i586

	KODIR can be used to override the directory in which modules are installed,
	but the kernel will always look for them in /boot/kernel/ no matter what.

	I think it should look in the same dir where they were installed.

diff -ur sys.old/conf/ sys/conf/
--- sys.old/conf/	2006-04-27 11:12:03.000000000 +0200
+++ sys/conf/	2006-04-27 13:04:47.000000000 +0200
@@ -68,7 +68,7 @@
 INCLUDES+= -I$S/dev/twa
 .if ${CC} != "icc"
 CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
 CFLAGS+= --param inline-unit-growth=100
diff -ur sys.old/kern/kern_linker.c sys/kern/kern_linker.c
--- sys.old/kern/kern_linker.c	2006-04-27 11:10:52.000000000 +0200
+++ sys/kern/kern_linker.c	2006-04-27 13:05:50.000000000 +0200
@@ -1383,7 +1383,7 @@
 static char linker_hintfile[] = "linker.hints";
-static char linker_path[MAXPATHLEN] = "/boot/kernel;/boot/modules";
+static char linker_path[MAXPATHLEN] = KODIR ";/boot/modules";
 SYSCTL_STRING(_kern, OID_AUTO, module_path, CTLFLAG_RW, linker_path,
     sizeof(linker_path), "module load search path");


More information about the freebsd-bugs mailing list