From nobody@FreeBSD.org  Tue Apr 12 13:12:17 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 954CC106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 13:12:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 626558FC1D
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 13:12:17 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p3CDCHaU049960
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 12 Apr 2011 13:12:17 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p3CDCHg0049959;
	Tue, 12 Apr 2011 13:12:17 GMT
	(envelope-from nobody)
Message-Id: <201104121312.p3CDCHg0049959@red.freebsd.org>
Date: Tue, 12 Apr 2011 13:12:17 GMT
From: Richard Naill <rich@enterprisesystems.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ibcs2 binaries  that execute on 4.x not working on 8.0 Abort Trap
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         156353
>Category:       kern
>Synopsis:       [ibcs2] ibcs2 binaries that execute on 4.x not working on 8.0 Abort Trap
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-emulation
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 12 13:20:10 UTC 2011
>Closed-Date:    
>Last-Modified:  Sun Apr 17 00:45:58 UTC 2011
>Originator:     Richard Naill
>Release:        FreeBSD 8.0
>Organization:
Enterprise Systems Inc
>Environment:
FreeBSD esi2.bsd 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 200
9     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
SCO binaries that execute in FreeBSD 4.x ok, IN FreeBSD 8.0 give error

This problem has occured since FreeBSD 5.x

$ ./pcmp
Abort trap

# kldstat
Id Refs Address    Size     Name
 1    8 0xc0400000 b6dfe0   kernel
 2    2 0xc5bc4000 b000     ibcs2.ko
 3    1 0xc5bd1000 3000     ibcs2_coff.ko

$ file pcmp
pcmp: 80386 COFF executable
$ truss ./pcmp
truss: can not get etype: No such process

IN FreeBSD 4.11
$ uname -a
FreeBSD esi.bsd 4.11-RELEASE FreeBSD 4.11-RELEASE #9: Wed May 26 08:16:14 EDT 20
10     root@esi.bsd:/usr/src/sys/compile/MYKERNEL  i386

$ ./pcmp
usage: ./pcmp [1st lib # to cmp] [2nd lib # to cmp]

$ file ./pcmp
./pcmp: MS Windows COFF Intel 80386 object file

$ truss ./pcmp
truss: Execution type IBCS2 COFF is not supported -- using FreeBSD a.out
: Unknown error: 0
truss: Execution type IBCS2 COFF is not supported -- using FreeBSD a.out
: Invalid argument
ioctl(1,0x5401,0xbfbfe7c2)                       = 0 (0x0)
usage: ./pcmp [1st lib # to cmp] [2nd lib # to cmp]

write(1,0x403ccc,53)                             = 53 (0x35)
Sample: ./pcmp 1 2

write(1,0x403ccc,21)                             = 21 (0x15)
        ** this will compare lib_1
write(1,0x403ccc,36)                             = 36 (0x24)
        **             to    lib_2

write(1,0x403ccc,37)                             = 37 (0x25)
close(0)                                         = 0 (0x0)
close(1)                                         = 0 (0x0)
close(2)                                         = 0 (0x0)
exit(0xffffffff)                                process exit, rval = 65280
>How-To-Repeat:
See above
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-emulation 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Apr 17 00:45:19 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=156353 
>Unformatted:
