Subject: port-i386/5517: IBCS2 compatibility now requires EXEC_ELF32
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jarle@runit.sintef.no>
List: netbsd-bugs
Date: 05/31/1998 22:04:55
>Number:         5517
>Category:       port-i386
>Synopsis:       IBCS2 compatibility now requires EXEC_ELF32
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 31 13:20:00 1998
>Last-Modified:
>Originator:     Jarle Greipsland
>Organization:
RUNIT
>Release:        NetBSD-1.3.2
>Environment:
System: NetBSD darling.runit.sintef.no 1.3.2 NetBSD 1.3.2 (DARLING) #3: Sun May 31 17:33:43 MEST 1998 jarle@darling.runit.sintef.no:/usr/src/sys/arch/i386/compile/DARLING i386


>Description:
One of my NetBSD/i386 systems is configured with the COMPAT_IBCS2 option,
but none of the COMPAT_SVR4, COMPAT_LINUX, COMPAT_FREEBSD options.
I've also managed to build my kernels without the EXEC_ELF32 option.  This
is no longer the case. During a kernel build, the following error occurred:

In file included from ../../../../kern/exec_conf.c:57:
../../../../compat/ibcs2/ibcs2_exec.h:286: syntax error before `Elf32_Ehdr'
cc1: warnings being treated as errors
../../../../compat/ibcs2/ibcs2_exec.h:286: warning: function declaration isn't a prototype
*** Error code 1

It now seems that any kernel configured with the COMPAT_IBCS2 option must
also include the EXEC_ELF32 option.  Since the IBCS2 exec file format, as
far as I know, is COFF, requiring the extra option is slightly
non-inituitive.

>How-To-Repeat:
Create a NetBSD/i386 kernel configuration file with the COMPAT_IBCS2 but
without the EXEC_ELF32 option.  make.
>Fix:
Document this dependency, or maybe make the ibcs2_elf32_probe prototype
declaration in the ibcs2_exec.h file dependent on EXEC_ELF32?

					-jarle
>Audit-Trail:
>Unformatted: