From owner-freebsd-current@FreeBSD.ORG Mon Jan 14 14:32:35 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C17616A418 for ; Mon, 14 Jan 2008 14:32:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id 2021213C469 for ; Mon, 14 Jan 2008 14:32:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by elvis.mu.org (Postfix) with ESMTP id 76C1B1A4D82; Mon, 14 Jan 2008 06:29:22 -0800 (PST) From: John Baldwin To: freebsd-current@freebsd.org Date: Mon, 14 Jan 2008 08:51:42 -0500 User-Agent: KMail/1.9.7 References: <477C82F0.5060809@freebsd.org> <868x348iiw.fsf@ds4.des.no> <478A6781.3030700@freebsd.org> In-Reply-To: <478A6781.3030700@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200801140851.44134.jhb@freebsd.org> Cc: Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?= , Tim Kientzle , Peter Schuller , Jason Evans , Peter Wemm Subject: Re: ELF dynamic loader name X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jan 2008 14:32:35 -0000 On Sunday 13 January 2008 02:33:21 pm Tim Kientzle wrote: > > Instead, the kernel automagically > > translates ld-elf.so.1 to ld-elf32.so.1 for 32-bit binaries, and gdb is > > none the wiser. > > Ah! I see. So let me see if I understand: > > * Peter Wemm's concern about gdb is that the library > reference in the compiled binaries always be "ld-elf.so.1" > so that the debugger and other system tools can identify > references to this special library. > * The kernel already has logic to translate refs to this > library to "ld-elf.so.1" for the single > special case of i386 on amd64 (even though "i386" seems to > be spelled "32" in this case). It's not an arch name. The '32' is because it is part of the freebsd32 compat ABI which provides an alternate syscall table just like ABIs for SVR4, IBCS2, and Linux. freebsd32 is not i386-specific, but instead is split into an MI portion that provides generic 32-bit wrapping for 64-bit platforms and MD backends (ia32 ABI on amd64 and ia64 for i386 currently). If you had foo32 and foo64 archs then freebsd32 (and thus ld-elf32.so.1) would be used on foo64 systems to run foo32 binaries. > * "Side-grades" from i386 to amd64 have the complication of > having to rename ld-elf.so.1 at some point in the process. > Failure to do this at the correct point risks breaking the > entire system. > > It still seems that renaming ld-elf.so.1 to ld-elf-.so.1 > on disk would solve the side-grade problem (nothing to be renamed, > only a new ld-elf-amd64.so.1 to install), and the existing > kernel translation logic could be generalized to allow all > binaries to refer to ld-elf.so.1, thus addressing the gdb > problem in the same way it's been handled for this case for > some time. I think the side-grade is such a special case (are you going to side-grade from ia64 to alpha?) that it doesn't warrant changing the rest of the system. We don't have /usr/-bin instead of /usr/bin. -- John Baldwin