kern/96429: kern_linker.c hardcodes "/boot/kernel" instead of using
KODIR
Robert Millan
rmh at aybabtu.com
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
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 27 19:30:11 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Robert Millan
>Release: GNU/kFreeBSD 5.4-1-586 i586
>Organization:
>Environment:
System: GNU/kFreeBSD io.debian.net 5.4-1-586 #0 Mon Dec 5 19:45:10 CET 2005 i586 i386 AMD-K6(tm) 3D processor GNU/kFreeBSD
Architecture: i586
>Description:
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.
>How-To-Repeat:
>Fix:
diff -ur sys.old/conf/kern.pre.mk sys/conf/kern.pre.mk
--- sys.old/conf/kern.pre.mk 2006-04-27 11:12:03.000000000 +0200
+++ sys/conf/kern.pre.mk 2006-04-27 13:04:47.000000000 +0200
@@ -68,7 +68,7 @@
INCLUDES+= -I$S/dev/twa
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
-CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
+CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -DKODIR=\"${KODIR}\" -include opt_global.h
.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");
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list