Date: Thu, 23 May 1996 06:12:06 -0700 (PDT) From: Jake Hamby <jehamby@hamby1.lightside.net> To: sos@FreeBSD.org Cc: current@FreeBSD.org Subject: Re: Can't run Linux static ELF binaries? Message-ID: <199605231312.GAA00518@hamby1.lightside.net>
next in thread | raw e-mail | index | archive | help
> In reply to Jake Hamby who wrote: > > > > What you are seeing is one of the "not so nice" features in ELF. > It is currently impossible to tell what OS a static ELF binary > is for, so the loader assumes (incorrectly) that it is a > native FreeBSD ELF binary and boom.. > There is NO pretty fix for this except marking the files in > some way. We know the problem and the workaround, but infact > we need coorporation with Linux/SVR4/whatever to set a standard > for this, so its likely not to happen :( Okay, thanks for the quick reply! This makes sense really, it looks like the way the ELF loader figures out which OS to run is by the filename of the dynamic loader (e.g. /lib/ld-linux.so for Linux, /usr/lib/ld.so.1 for SVR4). If the file is statically linked, well you'd expect the PT_PHDR section to contain some magic number for the OS, but I'll take your word that it doesn't. As a kludge, may I suggest that files within the /compat/linux directory be assumed to be Linux/ELF, and files in /compat/svr4 be assumed SVR4? Looks like the only statically linked programs are stuff like ldconfig anyway, which you would want to install in /compat so as not to conflict with FreeBSD's. ---Jake
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605231312.GAA00518>
