Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Apr 1999 23:15:20 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        freebsd-svr4@atdot.dotat.org, freebsd-emulation@freebsd.org
Subject:   Anyone working on SCO ELF binary emulation?
Message-ID:  <19990424231519.A25153@dan.emsphone.com>

next in thread | raw e-mail | index | archive | help

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.  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

and I guess from here on it's executing random code.

  6068 sh       CALL  svr4_sys_break(0x80592cc)
  6068 sh       RET   svr4_sys_break 0
  6068 sh       CALL  chown(0xbfbfc6c4,0xb,0xbfbfc8c4)
  6068 sh       NAMI  "^G"
  6068 sh       RET   chown -1 errno 2 No such file or directory
  6068 sh       CALL  #112
  6068 sh       PSIG  SIGSYS caught handler=0x804b0d0 mask=0x400 code=0x0
  6068 sh       RET   #112 -1 errno 22 Invalid argument
  6068 sh       CALL  exit(0)

Right at the start of the program's execution, it makes a sysarch()
syscall with subfunction 114.  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.

With the lack of documenation SCO provides, I'm surprised the ibcs/coff
emulation code got wirrten at all.

	-Dan Nelson
	dnelson@emsphone.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-emulation" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990424231519.A25153>