From owner-freebsd-arch@FreeBSD.ORG Fri Feb 13 21:08:58 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 654EA1065678 for ; Fri, 13 Feb 2009 21:08:58 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) Received: from mail.ambrisko.com (mail.ambrisko.com [64.174.51.43]) by mx1.freebsd.org (Postfix) with ESMTP id 36F468FC18 for ; Fri, 13 Feb 2009 21:08:58 +0000 (UTC) (envelope-from ambrisko@ambrisko.com) X-Ambrisko-Me: Yes Received: from server2.ambrisko.com (HELO www.ambrisko.com) ([192.168.1.2]) by ironport.ambrisko.com with ESMTP; 13 Feb 2009 13:09:38 -0800 Received: from ambrisko.com (localhost [127.0.0.1]) by www.ambrisko.com (8.14.1/8.14.1) with ESMTP id n1DL8vxd086319; Fri, 13 Feb 2009 13:08:57 -0800 (PST) (envelope-from ambrisko@ambrisko.com) Received: (from ambrisko@localhost) by ambrisko.com (8.14.3/8.14.3/Submit) id n1DL8uG2086318; Fri, 13 Feb 2009 13:08:56 -0800 (PST) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200902132108.n1DL8uG2086318@ambrisko.com> In-Reply-To: <20090213001935.GA21752@zim.MIT.EDU> To: David Schultz Date: Fri, 13 Feb 2009 13:08:56 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL94b (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Cc: Kostik Belousov , arch@FreeBSD.ORG Subject: Re: rtld enhancement to add osversion sub-directory search X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2009 21:08:59 -0000 David Schultz writes: | On Thu, Feb 12, 2009, Doug Ambrisko wrote: | > Kostik Belousov writes: | > | There is a popular feature, unfortunately, not supported by FreeBSD | > | ld.so, called Dynamic String Tokens, see | > | http://docs.sun.com/app/docs/doc/817-1984/appendixc-4?l=en&a=view | > | | > | I have almost abandoned patch that adds support for $ORIGIN, $OSREL, | > | $OSNAME, and $PLATFORM. Quite amazingly, it merged with today CURRENT | > | without serious conflicts. | > | http://people.freebsd.org/~kib/misc/rtld_locks.4.patch | > | > That is an interesting feature, however, it almost seems backwards for | > me if I understand it correctly. I need old binaries to find the library | > it was built with and not new ones based on the base OS. The plus that | > I see with their feature is for a library that has been optimized for a | > specific type of CPU etc. | | The Solaris rtld features are very useful when you want to | export a volume with a bunch of apps over NFS, and the clients are | running different releases or different architectures. It can | probably also solve your problem if you bother to place different | library versions in different directories and set your library | path appropriately. Unless I missed something it seems to be an inverse feature to what I want since it expands based on the current kernel's uname type results. I need it to expand based on the original OS that it was built on. I'll have to see if my Solaris box at work has this feature or not. I can't change LD_LIBRARY_PATH etc. type things. Doing ldconfig -m of various things doesn't help since that can find the wrong one. My idea was to do something like what happens for 32bit on 64bit and Linux on FreeBSD in that it looks at osversion specific places then the standard. Doug A.