From owner-freebsd-hackers Sat Mar 25 02:40:07 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id CAA16706 for hackers-outgoing; Sat, 25 Mar 1995 02:40:07 -0800 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id CAA16686 for ; Sat, 25 Mar 1995 02:39:50 -0800 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA00485; Sat, 25 Mar 1995 11:39:26 +0100 Received: by sax.sax.de (8.6.9/8.6.9-s1) with UUCP id LAA08353 for freebsd-hackers@freebsd.org; Sat, 25 Mar 1995 11:39:25 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id LAA12525 for freebsd-hackers@freebsd.org; Sat, 25 Mar 1995 11:32:28 +0100 From: J Wunsch Message-Id: <199503251032.LAA12525@uriah.heep.sax.de> Subject: Re: env-dependant symlinks [Was: DEC Alpha Multia (fwd)] To: freebsd-hackers@FreeBSD.org (FreeBSD hackers) Date: Sat, 25 Mar 1995 11:32:27 +0100 (MET) In-Reply-To: <23776.796085665@freefall.cdrom.com> from "Jordan K. Hubbard" at Mar 24, 95 02:54:25 pm Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1142 Sender: hackers-owner@FreeBSD.org Precedence: bulk As Jordan K. Hubbard wrote: > > The main problem is getting access to the environment from the namei() > code. getenv/putenv all manipulate a malloc'd region in the process > context and there's not even a handle on it that's easy to get to from > the system. You figure that out and the expanion should be trivial! What's wrong with the approach to make this all in userland? I've seen this on Data General's DG/UX. They do have so-called ``elinks'', i.e. symlinks starting with the string "elink:". They are used to switch between different software development environments, and they made their development tools (cc, as, ld, nm, ar) aware of them, and resolve the paths there. Other tools can easily made aware of them, too (including scripts), by simply looking what the links points to, and resolving it in their own context. A typical elink there is (written from mind, need not be exact): crt0.o -> \ elink:/${SDEROOT:-usr}/sde/${TARGET_BINARY_INTERFACE:-m88kdgux}/usr/lib/crt0.o -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)