Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2005 10:08:59 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Michael Hopkins <michael.hopkins@hopkins-research.com>
Cc:        "freebsd-amd64@freebsd.org" <freebsd-amd64@freebsd.org>
Subject:   Re: Cross-compiling/porting to Linux
Message-ID:  <20050329160858.GB72462@dan.emsphone.com>
In-Reply-To: <BE6EFB45.36AB4%michael.hopkins@hopkins-research.com>
References:  <BE6EFB45.36AB4%michael.hopkins@hopkins-research.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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