From owner-freebsd-emulation Mon Apr 26 2:57:13 1999 Delivered-To: freebsd-emulation@freebsd.org Received: from atdot.dotat.org (atdot.dotat.org [150.101.89.3]) by hub.freebsd.org (Postfix) with ESMTP id EFDC614BE2 for ; Mon, 26 Apr 1999 02:57:07 -0700 (PDT) (envelope-from newton@atdot.dotat.org) Received: (from newton@localhost) by atdot.dotat.org (8.9.2/8.7) id TAA21511; Mon, 26 Apr 1999 19:25:29 +0930 (CST) From: Mark Newton Message-Id: <199904260955.TAA21511@atdot.dotat.org> Subject: Re: [freebsd-svr4] Anyone working on SCO ELF binary emulation? To: freebsd-svr4@atdot.dotat.org Date: Mon, 26 Apr 1999 19:25:29 +0930 (CST) Cc: freebsd-emulation@freebsd.org In-Reply-To: <19990424231519.A25153@dan.emsphone.com> from "Dan Nelson" at Apr 24, 99 11:15:20 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Dan Nelson wrote: > I have the duty of making the latest MicroFocus COBOL compiler run > on FreeBSD, and was wondering if anyone has had any luck getting > SCO/ELF binaries to run under emulation on -current. Yup, in certain limited cases. It still needs work, though. Interested in helping out? :-) > MicroFocus has > binaries for SCO 3.2v4.2 which I'm sure will work, but I wanted to see > how hard it would be to get the current 5.0.4 binaries to work on BSD. > What I've done so far is just made the xenix syscall jump into the ibcs > xenix code, since even the latest SCO binaries want to call obsolete > xenix syscalls. /bin/sh works, almost. The COBOL installer program > runs until it tries to execute the 'pwd' command. It segfaults after > doing an fstat on ".." > 6068 sh CALL svr4_sys_open(0xbfbfd1a9,0x80,0x280ac28c) > 6068 sh NAMI ".." > 6068 sh RET svr4_sys_open 3 > 6068 sh CALL svr4_sys_fcntl(0x3,0x2,0x1) > 6068 sh RET svr4_sys_fcntl 0 > 6068 sh CALL svr4_sys_fstat(0x3,0xbfbfc960) > 6068 sh RET svr4_sys_fstat 0 > 6068 sh PSIG SIGSEGV caught handler=0x804b220 mask=0x0 code=0xc Hang on, are we talking about xenix or SCO here? Your ktrace output includes svr4_sys_* routines (which come from the ELF svr4 emulator), but you're talking about ibcs2 stuff above. > Right at the start of the program's execution, it makes a sysarch() > syscall with subfunction 114. Most SysVR4 programs do something similar. I think it's actually ld.so.1 that's doing it. > SCO's documentation lists it as > SI86GETFEATURES, but of course doesn't say what the arguments are, or > what I should be returning. My guess is that my failure to return > valid info for this syscall is what's making 'pwd' fail. Doubtful. FreeBSD's emulation should work in total ignorance of what sysarch() returns (although sysarch() is emulated, so if that isn't the case then values can be fudged which stop executables from crashing). > With the lack of documenation SCO provides, I'm surprised the ibcs/coff > emulation code got wirrten at all. Tell me about it. SysVR4 ELF is only marginally better. - mark -------------------------------------------------------------------- I tried an internal modem, newton@atdot.dotat.org but it hurt when I walked. Mark Newton ----- Voice: +61-4-1620-2223 ------------- Fax: +61-8-82231777 ----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message