From owner-freebsd-questions Thu Nov 13 10:02:36 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA02870 for questions-outgoing; Thu, 13 Nov 1997 10:02:36 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from gdi.uoregon.edu (gdi.uoregon.edu [128.223.170.30]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA02856 for ; Thu, 13 Nov 1997 10:02:32 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Received: from localhost (dwhite@localhost) by gdi.uoregon.edu (8.8.7/8.8.7) with SMTP id KAA02061; Thu, 13 Nov 1997 10:02:18 -0800 (PST) (envelope-from dwhite@gdi.uoregon.edu) Date: Thu, 13 Nov 1997 10:02:18 -0800 (PST) From: Doug White Reply-To: Doug White To: Robert Eckardt cc: uzsv2k@uni-bonn.de, questions@FreeBSD.ORG Subject: Re: ELF binary type not known In-Reply-To: <199711130020.BAA01519@ghost.mep.ruhr-uni-bochum.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Thu, 13 Nov 1997, Robert Eckardt wrote: > > > Has anybody cooked a hack to avoid branding for a default type > > > of ELF binaries ? > > > Like some sysctl to set the default e.g. to Linux to say > > > "if it's ELF and you didn't find a type, assume Linux". > > > (Just to be able to install directly from CD.) > > > > The problem with this is: > > > > 1. The Linux emulator isn't loaded by default. > This could be checked. > > > 2. We're leaving the path clear for FreeBSD-native ELF binaries and > > changing it would be a bad precedent. I forgot #3: 3. The ELF format doesn't define a system-type flag. Without branding it's impossible to tell Linux ELF, BSDi ELF and FreeBSD ELF apart. The brand is a bit of a hack, using some unused space in the ELF definition. > Ideally, it should be possible on a per user/process basis. > The difference were the flexibility to declare a binary to be > of type X. > I am just looking for a way to temporarily "brand" an otherwise > read-only executable to be of some specific type. Ah the motivation :-) The hack should be in the code where the brand is found -- have it return Linux regardless. > Of course, I assume that FreeBSD binaries would always be properly > branded, being aware of the existing situation. > > > The solution is probably closer to pointing big fingers at the > > ``linux_enable'' hook in /etc/rc.conf. Handbook section maybe? > Sorry, I didn't get this point. ??? I was thinking of the ramifications of enabling the linuxulator by default and decided that if people want to get into linux emulation they have to get the lib port anyway, so there's no sense enabling it if the libs aren't installed. It was a tangent. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major