From owner-freebsd-emulation@FreeBSD.ORG Tue Mar 29 16:09:02 2005 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75BBF16A4CE; Tue, 29 Mar 2005 16:09:02 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id E7C0043D2F; Tue, 29 Mar 2005 16:09:01 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.3) id j2TG8xZc051436; Tue, 29 Mar 2005 10:08:59 -0600 (CST) (envelope-from dan) Date: Tue, 29 Mar 2005 10:08:59 -0600 From: Dan Nelson To: Michael Hopkins Message-ID: <20050329160858.GB72462@dan.emsphone.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 5.4-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.8i cc: freebsd-emulation@freebsd.org cc: "freebsd-amd64@freebsd.org" Subject: Re: Cross-compiling/porting to Linux X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2005 16:09:02 -0000 In the last episode (Mar 29), Michael Hopkins said: > On a related topic - I can see that there are ports for converting > binaries between different formats (e.g. ELF to a.out). As there is > already a runtime compatibility established, how easy would it be to > build something that reads in a FreeBSD binary or library and outputs > a linux one? Just a thought. That would be near impossible. The elf2aout program in ports has a specific purpose: to convert static elf binaries to a.out format so simple bootloaders can execute them. The binary format is the least of your worries when trying to run under a different OS. You've got structure changes (FILE for example), constant changes (ioctls, signals, errnos), syscall number changes (even the method to invoke syscalls is different), possibly different reserved registers, etc. -- Dan Nelson dnelson@allantgroup.com