Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

kernel/3073: exec_elf w/ compat_netbsd

From: <boris(at)rootroute.com>
Date: Tue Jan 21 2003 - 14:08:06 EST


>Number: 3073
>Category: kernel
>Synopsis: exec_elf w/ compat_netbsd
>Confidential: no
Rootroute CRD
>Environment:

	System      : OpenBSD 3.2
	Architecture: OpenBSD.i386 and probably other non-64 arch
	Machine     : i386

>Description:
in kern/exec_elf.c: netbsd_elf64_probe not ok for non-64 arch
>How-To-Repeat:
cd /sys/arch/i386/conf; cp GENERIC TEST with added 32a33 > option COMPAT_NETBSD cd ../compile/TEST && make depend && make ... In file included from /usr/src/sys/arch/i386/compile/TEST/../../../../kern/exec_elf32.c:8: /usr/src/sys/arch/i386/compile/TEST/../../../../kern/exec_elf.c:91: `netbsd_elf64_probe' undeclared here (not in a function)
/usr/src/sys/arch/i386/compile/TEST/../../../../kern/exec_elf.c:91: initializer element is not constant /usr/src/sys/arch/i386/compile/TEST/../../../../kern/exec_elf.c:91: (near initialization for `elf32_probes[3].func') *** Error code 1
>Fix:

        we wrap the exec format probe around this:

diff -u exec_elf.c $rootr/sys
--- exec_elf.c Fri Nov 22 22:10:21 2002 +++ /ssa/rootr/sys/exec_elf.c Tue Jan 21 15:27:31 2003 @@ -88,7 +88,9 @@

        { linux_elf_probe, 1 << OOS_LINUX },

 #endif
 #ifdef COMPAT_NETBSD
+#ifdef _KERN_DO_ELF64
        { netbsd_elf64_probe, 1 << OOS_NETBSD },
+#endif
 #endif

        { 0, 1 << OOS_OPENBSD }
 };

	this fix is according sys/compat/netbsd/netbsd_exec.c
	then the re-make'd kernel boots and runs ok.

>Release-Note:
Received on Tue Jan 21 17:04:34 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 13:29:48 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library