Date: Sun, 8 May 2005 12:30:14 GMT From: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/80760: [PATCH] svr4.ko should depend on sysv(msg|sem). Message-ID: <200505081230.j48CUDw2045661@freebsd.czest.pl> Resent-Message-ID: <200505081230.j48CU8dV095894@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 80760
>Category: kern
>Synopsis: [PATCH] svr4.ko should depend on sysv(msg|sem).
>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: Sun May 08 12:30:08 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Wojciech A. Koszek
>Release: FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD dunstan.freebsd.czest.pl 5.4-STABLE FreeBSD 5.4-STABLE #5: Sun May 8 11:57:11 CEST 2005 dunstan@dunstan.freebsd.czest.pl:/usr/obj/usr/src/sys/HOME8 i386
>Description:
SVRv4 code depends on System V IPC primitives, which might be loaded as
KLDs. If they're not loaded before svr4.ko, its loading procedure will fail.
>How-To-Repeat:
SystemV options needs to be disabled in your kernel configuration:
[..]
#options SYSVSHM # SYSV-style shared memory
#options SYSVMSG # SYSV-style message queues
#options SYSVSEM # SYSV-style semaphores
# kldstat | grep sysv
# cd /usr/src/sys/modules/svr4
# make load
[..]
objcopy --strip-debug svr4.ko
/sbin/kldload -v /usr/src/sys/modules/svr4/svr4.ko
kldload: can't load /usr/src/sys/modules/svr4/svr4.ko: No such file or directory
*** Error code 1
Stop in /usr/src/sys/modules/svr4.
[..]
# dmesg | tail -1
link_elf: symbol msginfo undefined
>Fix:
Patch [diff.0.svr4_sysvec.c] adds MODULE_DEPEND macros.
--- diff.0.svr4_sysvec.c begins here ---
Patch against FreeBSD 5.4-STABLE, kern.osreldate: 504100.
diff -uprP /usr/src/sys/compat/svr4/svr4_sysvec.c src/sys/compat/svr4/svr4_sysvec.c
--- /usr/src/sys/compat/svr4/svr4_sysvec.c Sat Feb 12 09:36:02 2005
+++ src/sys/compat/svr4/svr4_sysvec.c Sun May 8 14:24:32 2005
@@ -424,3 +424,5 @@ static moduledata_t svr4_elf_mod = {
};
DECLARE_MODULE(svr4elf, svr4_elf_mod, SI_SUB_EXEC, SI_ORDER_ANY);
MODULE_DEPEND(svr4elf, streams, 1, 1, 1);
+MODULE_DEPEND(svr4elf, sysvmsg, 1, 1, 1);
+MODULE_DEPEND(svr4elf, sysvsem, 1, 1, 1);
--- diff.0.svr4_sysvec.c ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505081230.j48CUDw2045661>
