Subject: kern/34010: undefined reference to `uvm_mremap' in LKM compat_linux.o.
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <tnozaki@netbsd.org>
List: netbsd-bugs
Date: 07/16/2006 06:10:00
>Number: 34010
>Category: kern
>Synopsis: undefined reference to `uvm_mremap' in LKM compat_linux.o.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 16 06:10:00 +0000 2006
>Originator: Takehiko NOZAKI
>Release: 3.99.22
>Organization:
>Environment:
NetBSD spooky.example.com 3.99.22 NetBSD 3.99.22 (SPOOKY) #0: Sun Jul 16 13:05:57 JST 2006 root@spooky.example.com:/usr/obj/sys/arch/i386/compile/SPOOKY i386
>Description:
undefined reference to `uvm_mremap' in /usr/lkm/compat_linux.o.
>How-To-Repeat:
# /sbin/modload /usr/lkm/compat_linux.o
/usr/lkm/compat_linux.o: In function `linux_sys_mremap':
: undefined reference to `uvm_mremap'
modload can't prelink `/usr/lkm/compat_linux.o' creating `/usr/lkm/compat_linux'
$ nm /usr/lkm/compat_linux.o | grep uvm_mremap
U uvm_mremap
$ nm /usr/lkm/netbsd | grep -c uvm_mremap
0
>Fix:
Index: sys/uvm/files.uvm
===================================================================
RCS file: /cvsroot/src/sys/uvm/files.uvm,v
retrieving revision 1.4
diff -u -r1.4 files.uvm
--- sys/uvm/files.uvm 21 Jan 2006 13:34:15 -0000 1.4
+++ sys/uvm/files.uvm 16 Jul 2006 05:53:50 -0000
@@ -22,7 +22,7 @@
file uvm/uvm_map.c
file uvm/uvm_meter.c
file uvm/uvm_mmap.c
-file uvm/uvm_mremap.c compat_linux
+file uvm/uvm_mremap.c
file uvm/uvm_page.c
file uvm/uvm_pager.c
file uvm/uvm_pdaemon.c
or
Index: Makefile
===================================================================
RCS file: /cvsroot/src/sys/lkm/compat/linux/Makefile,v
retrieving revision 1.27
diff -u -r1.27 Makefile
--- sys/lkm/compat/linux/Makefile 11 Dec 2005 12:24:47 -0000 1.27
+++ sys/lkm/compat/linux/Makefile 14 Jul 2006 17:12:54 -0000
@@ -6,6 +6,7 @@
.PATH: $S/compat/linux/arch/${MACHINE_ARCH}
.PATH: $S/compat/linux/common $S/compat/linux
.PATH: $S/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
+.PATH: $S/uvm
CPPFLAGS+= -DNWSDISPLAY=1 -DSYSVSEM -DSYSVMSG -DSYSVSHM -DCOMPAT_LINUX
CPPFLAGS+= -nostdinc -DKTRACE -DNSEQUENCER=1 -DINET6
@@ -23,6 +24,7 @@
SRCS+= linux_machdep.c linux_syscalls.c linux_sysent.c
SRCS+= linux_fdio.c linux_hdio.c linux_blkio.c linux_sysctl.c
SRCS+= linux_sg.c linux_mtio.c
+SRCS+= uvm_mremap.c
# XXXX - temporary, not applicable for kernel with COMPAT_43, OSSAUDIO
#.PATH: $S/compat/common $S/compat/ossaudio