From owner-freebsd-hackers Tue Oct 15 13:56:01 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA08089 for hackers-outgoing; Tue, 15 Oct 1996 13:56:01 -0700 (PDT) Received: from mail.crl.com (mail.crl.com [165.113.1.22]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id NAA08037; Tue, 15 Oct 1996 13:54:49 -0700 (PDT) Received: from SandBox.CyberCity.dk (disn36.cybercity.dk) by mail.crl.com with SMTP id AA25283 (5.65c/IDA-1.5); Tue, 15 Oct 1996 13:53:23 -0700 Received: (from sos@localhost) by SandBox.CyberCity.dk (8.7.6/8.7.3) id WAA02300; Tue, 15 Oct 1996 22:41:18 +0200 (MET DST) Message-Id: <199610152041.WAA02300@SandBox.CyberCity.dk> Subject: Re: Linux compat issue(s) To: terry@lambert.org (Terry Lambert) Date: Tue, 15 Oct 1996 22:41:18 +0200 (MET DST) From: "Soren Schmidt" Cc: sos@FreeBSD.org, msmith@atrad.adelaide.edu.au, hackers@FreeBSD.org In-Reply-To: <199610151906.MAA01321@phaeton.artisoft.com> from "Terry Lambert" at Oct 15, 96 12:06:01 pm From: sos@FreeBSD.org Reply-To: sos@FreeBSD.org X-Mailer: ELM [version 2.4 PL25 ME8b] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In reply to Terry Lambert who wrote: > > > > Should I assume that this is the "what static ELF binary is this" problem? > > > > Exactly, the static ELF program is run as a FreeBSD native bin, there > > is no way to know better (yet). > > I guess we'll have to provide a solution for this shortcoming in > > ELF (WHO said ELF was "the way to go" *sigh*) > > I can do a "quick&dirty"(tm) little program that marks ELF bins so that > > we can distinguish them, but it breaks the ELF std. one way or another. > > With respect, Linux distinguished the SVR4 vs. Linux ELF binaries. > > It does this by looking for the ld.so reference (which it always > includes so it can use dlopen/etc.) and seeing the word "linux" in > the ld.so file name reference. I think they also look at the crt0 > startup code in the static binary case. How come that took so long Terry ?? So do we in the dynamically linked case, almost all ELF implemetations on the x86 platform use different named/located interpreters. It is only the statically linked binaries that is the problem. Linux has the same problems we do, they have implemented another hack than the one I suggest, just their method isn't very robust but they're used to that, right :) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Sxren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end ..