From owner-freebsd-current@FreeBSD.ORG Sat Jan 5 14:16:33 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 71B4516A420; Sat, 5 Jan 2008 14:16:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 40BA513C4CC; Sat, 5 Jan 2008 14:16:33 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 5FC08209C; Sat, 5 Jan 2008 15:16:24 +0100 (CET) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: -0.2/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 3CDC6207E; Sat, 5 Jan 2008 15:16:24 +0100 (CET) Received: by ds4.des.no (Postfix, from userid 1001) id 0FBE9844C3; Sat, 5 Jan 2008 15:16:24 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Tim Kientzle References: <477C82F0.5060809@freebsd.org> <863ateemw2.fsf@ds4.des.no> <200801032200.25650.peter.schuller@infidyne.com> <8663yac62d.fsf@ds4.des.no> <477E72FC.5070304@freebsd.org> <477EA466.6060204@FreeBSD.org> <477EFEAB.8090807@freebsd.org> Date: Sat, 05 Jan 2008 15:16:23 +0100 In-Reply-To: <477EFEAB.8090807@freebsd.org> (Tim Kientzle's message of "Fri\, 04 Jan 2008 19\:51\:07 -0800") Message-ID: <868x348iiw.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-current@freebsd.org, 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: Sat, 05 Jan 2008 14:16:33 -0000 Tim Kientzle writes: > It also seems that your argument applies just as well to ld-elf.so.1 > and ld-elf32.so.1. Either way, there's more than one ld-elf.so.1, and > therefore more than one name to keep track of. We don't embed ld-elf32.so.1 in 32-bit binaries; if we did, we couldn't run unmodified i386 binaries on amd64, or move i386 binaries built on an amd64 system to a real i386 system. Instead, the kernel automagically translates ld-elf.so.1 to ld-elf32.so.1 for 32-bit binaries, and gdb is none the wiser. (see src/sys/sys/imgact_elf.h, src/sys/kern/imgact_elf.c, and the various instances of Elf_Brandinfo, Elf32_Brandinfo and Elf64_Brandinfo in the kernel for the precise details of how this is done) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no