Subject: port-amiga/5782: cannot execute mc68020/sun3 binaries
To: None <gnats-bugs@gnats.netbsd.org>
From: None <marco@amisan.iss.infn.it>
List: netbsd-bugs
Date: 07/17/1998 16:26:14
>Number:         5782
>Category:       port-amiga
>Synopsis:       cannot execute mc68020/sun3 binaries
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 17 07:20:00 1998
>Last-Modified:
>Originator:     Marco Ciuchini
>Organization:
INFN
>Release:        NetBSD-1.3.2
>Environment:
System: NetBSD amisan 1.3.2 NetBSD 1.3.2 (AMISAN) #2: Fri Jul 3 12:51:43 CEST 1998 marco@amisan:/local/src/sys/arch/amiga/compile/AMISAN amiga
>Description:
Starting from NetBSD 1.3.1, the Sun3 program Schoonschip no more works, giving
the error: "Schip: Exec format error. Binary file not executable.".
It used to work in 1.3.
>How-To-Repeat:
Get the sun3 version of Schoonschip from archive.umich.edu and try to
execute it. The same problem probably applies to other mc68020/sun3
binaries.
>Fix:
I reverse-patched the function
cpu_exec_aout_makecmds in /usr/src/sys/arch/amiga/amiga/machdep.c
to the 1.3 source code. It works, but this may possibly cause other
problems I am not aware of. Anyway, here is the patch:
--- /usr/src/sys/arch/amiga/amiga/machdep.c.orig	Fri Jul  3 12:49:35 1998
+++ /usr/src/sys/arch/amiga/amiga/machdep.c	Fri Jul  3 13:03:00 1998
@@ -2072,4 +2072,13 @@
 		return(exec_aout_prep_zmagic(p, epp));
 #endif
+#ifdef COMPAT_SUNOS
+      {
+        extern sunos_exec_aout_makecmds
+        __P((struct proc *, struct exec_package *));
+        if ((error = sunos_exec_aout_makecmds(p, epp)) == 0)
+                return(0);
+
+      }
+#endif
 	return(error);
 }
>Audit-Trail:
>Unformatted: