NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-amd64/39964: modules/compat_linux: missing symbols on amd64



>Number:         39964
>Category:       port-amd64
>Synopsis:       modules/compat_linux: missing symbols on amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-amd64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 20 03:20:00 +0000 2008
>Originator:     Juan RP
>Release:        Latest
>Organization:
>Environment:
>Description:
compat_linux module gives some warnings that doesn't allow to load
the module successfully:

WARNING: linker error: symbol `linux_sysent' not found
WARNING: linker error: symbol `linux_trapsignal' not found
WARNING: linker error: symbol `linux_sendsig' not found
WARNING: linker error: symbol `linux_machdepioctl' not found
WARNING: linker error: symbol `release_futexes' not found
WARNING: linker error: symbol `linux_set_newtls' not found
WARNING: linker error: symbol `linux_syscallnames' not found
WARNING: linker error: symbol `linux_esigcode' not found
WARNING: linker error: symbol `linux_init_thread_area' not found
WARNING: linker error: symbol `linux_syscall_intern' not found
WARNING: linker error: symbol `linux_get_newtls' not found
WARNING: linker error: symbol `linux_sigcode' not found
WARNING: linker error: symbol `linux_sys_futex' not found
WARNING: linker error: symbol `linux_setregs' not found
WARNING: linker error: symbol `linux_usertrap' not found
WARNING: module error: unable to affix module

>How-To-Repeat:

>Fix:
The following patch seems to allow to load the module and run correctly
some binaries from pkgsrc/emulators/suse100_<blah>.

$ modstat|grep compat_linux
compat_linux    misc    filesys 0       77948   
compat,compat_ossaudio,exec_elf64
$ /emul/linux/bin/uname -a                       
Linux sasha 2.4.18 #0 Wed Feb 20 20:00:02 CET 2002 x86_64 x86_64 x86_64 
GNU/Linux
$ /emul/linux/usr/bin/ldd /emul/linux/bin/uname
        libc.so.6 => /lib64/libc.so.6 (0x00007f7ffdbd7000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7ffde00000)
$

Index: modules/compat_linux/Makefile
===================================================================
RCS file: /cvsroot/src/sys/modules/compat_linux/Makefile,v
retrieving revision 1.1
diff -b -u -p -r1.1 Makefile
--- modules/compat_linux/Makefile       19 Nov 2008 18:36:08 -0000      1.1
+++ modules/compat_linux/Makefile       20 Nov 2008 03:07:41 -0000
@@ -25,13 +25,13 @@ SRCS+=      linux_exec_aout.c linux_sigcode.S
 SRCS+= linux_uselib.c
 .endif

-.if ${MACHINE} == "x86_64"
+.if ${MACHINE} == "amd64"
 CPPFLAGS+=     -DEXEC_ELF64
 .PATH: ${S}/compat/linux/arch/amd64
 .PATH: ${S}/arch/amd64/amd64
 .PATH: ${S}/arch/x86/x86
 SRCS+= linux_machdep.c linux_syscalls.c linux_sysent.c linux_commons.c
-SRCS+= linux_ptrace.c linux_exec_machdep.c linux_support.S linux_exec_elf64.c
+SRCS+= linux_exec_machdep.c linux_support.S linux_exec_elf64.c
 SRCS+= linux_sigcode.S linux_syscall.c linux_trap.c
 .endif

Index: compat/linux/arch/amd64/linux_exec_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/compat/linux/arch/amd64/linux_exec_machdep.c,v
retrieving revision 1.13
diff -b -u -p -r1.13 linux_exec_machdep.c
--- compat/linux/arch/amd64/linux_exec_machdep.c        28 Oct 2008 18:37:41 
-0000      1.13
+++ compat/linux/arch/amd64/linux_exec_machdep.c        20 Nov 2008 03:07:41 
-0000
@@ -67,6 +67,9 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_m
 #include <compat/linux/common/linux_exec.h>
 #include <compat/linux/common/linux_errno.h>
 #include <compat/linux/common/linux_prctl.h>
+#include <compat/linux/common/linux_ipc.h>
+#include <compat/linux/common/linux_sem.h>
+
 #include <compat/linux/linux_syscallargs.h>

 int
Index: compat/linux/arch/amd64/linux_support.S
===================================================================
RCS file: /cvsroot/src/sys/compat/linux/arch/amd64/linux_support.S,v
retrieving revision 1.1
diff -b -u -p -r1.1 linux_support.S
--- compat/linux/arch/amd64/linux_support.S     26 Oct 2008 20:25:49 -0000      
1.1
+++ compat/linux/arch/amd64/linux_support.S     20 Nov 2008 03:07:41 -0000
@@ -30,7 +30,9 @@
  *
  * $FreeBSD: src/sys/amd64/linux32/linux32_support.s,v 1.1 2007/05/23 08:33:05 
kib Exp $
  */
+#ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
+#endif
 #include <machine/asm.h>

 #include "assym.h"
Index: compat/linux/common/linux_exec_elf32.c
===================================================================
RCS file: /cvsroot/src/sys/compat/linux/common/linux_exec_elf32.c,v
retrieving revision 1.81
diff -b -u -p -r1.81 linux_exec_elf32.c
--- compat/linux/common/linux_exec_elf32.c      28 Apr 2008 20:23:43 -0000      
1.81
+++ compat/linux/common/linux_exec_elf32.c      20 Nov 2008 03:07:43 -0000
@@ -66,6 +66,8 @@ __KERNEL_RCSID(0, "$NetBSD: linux_exec_e
 #include <compat/linux/common/linux_util.h>
 #include <compat/linux/common/linux_exec.h>
 #include <compat/linux/common/linux_machdep.h>
+#include <compat/linux/common/linux_ipc.h>
+#include <compat/linux/common/linux_sem.h>

 #include <compat/linux/linux_syscallargs.h>
 #include <compat/linux/linux_syscall.h>



Home | Main Index | Thread Index | Old Index