Date: Tue, 15 Oct 1996 20:16:41 +0200 (MET DST) From: sos@freebsd.org To: jdp@polstra.com (John Polstra) Cc: msmith@atrad.adelaide.edu.au, hackers@freebsd.org, sos@freebsd.org Subject: Re: Linux compat issue(s) Message-ID: <199610151816.UAA01759@SandBox.CyberCity.dk> In-Reply-To: <199610151643.JAA03974@austin.polstra.com> from "John Polstra" at Oct 15, 96 09:43:33 am
next in thread | previous in thread | raw e-mail | index | archive | help
In reply to John Polstra who wrote: > > I still don't agree with Soren: > > > ... ELF is > > only supposed to handle ONE os type per platform, what we are doing > > is blasfemy (ie not running SVR4). [stuff deleted] > The Note section idea also doesn't solve the entire problem. We could > mark our own FreeBSD ELF files with Note sections, so we could recognize > them. But unless we could persuade the Linux people to do likewise, we'd > still be unable to distinguish between Linux ELF files and SVR4 ELF files. > This is going to be a problem no matter what we do, though. So, you agree with me after all :) 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. 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.... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end ..
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610151816.UAA01759>