Date: Wed, 16 Oct 1996 11:17:45 +0930 (CST) From: Michael Smith <msmith@atrad.adelaide.edu.au> To: sos@freebsd.org Cc: jdp@polstra.com, msmith@atrad.adelaide.edu.au, hackers@freebsd.org Subject: Re: Linux compat issue(s) Message-ID: <199610160147.LAA27723@genesis.atrad.adelaide.edu.au> In-Reply-To: <199610151816.UAA01759@SandBox.CyberCity.dk> from "sos@freebsd.org" at Oct 15, 96 08:16:41 pm
next in thread | previous in thread | raw e-mail | index | archive | help
sos@freebsd.org stands accused of saying: > > Its not even enough to distinguish between Linux/FreeBSD (which we could > with note sections) and the rest, we will eventually have to be able to > tell Solaris/DGUX/Olivetti-SVR4/NCR-SVR4/whatnot from each other too, > or we will be in hell anyway. I know for a fact that if we are going > to do SVR4 emulation we will NEED a way to tell them apart. So having > a nice little util that marks the ELF header in ways for us to know > is the ONLY solution to this problem, like it or not. Ok; I'm with you. So how does this sound, for an ELF binary under consideration to be executed : - Look at CPU type (if there is room to hijack this), or 'branding area' if not, to determine binary type. - Look at ld.so path (if present) and attempt to infer type from this. - Fail execution of the binary, with an error to the user and perhaps also the console indicating that an unidentifiable ELF binary was invoked. > I propose that we use some unused space in the ELF header. The ELF header > starts with a 16byte char field, where only the first 8 are used in > all the ELF/i386 incarnations I've seen, so we can put a 8 char > text here for the platform (that can easily be seen with the file(1) > cmd too). Simple, easy, nice hack, works.... Sounds OK. I will hit the references Terry has proffered and see what, if anything, I can come up with. -- ]] Mike Smith, Software Engineer msmith@atrad.adelaide.edu.au [[ ]] Genesis Software genesis@atrad.adelaide.edu.au [[ ]] High-speed data acquisition and (GSM mobile) 0411-222-496 [[ ]] realtime instrument control (ph/fax) +61-8-267-3039 [[ ]] Collector of old Unix hardware. "Where are your PEZ?" The Tick [[
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610160147.LAA27723>