From owner-freebsd-arch@FreeBSD.ORG Thu Jun 17 21:29:04 2010 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 92A7E1065702 for ; Thu, 17 Jun 2010 21:29:04 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 552DD8FC14 for ; Thu, 17 Jun 2010 21:29:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o5HLQQ84074737; Thu, 17 Jun 2010 15:26:26 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Thu, 17 Jun 2010 15:26:30 -0600 (MDT) Message-Id: <20100617.152630.460114267490874908.imp@bsdimp.com> To: d@delphij.net, delphij@delphij.net From: "M. Warner Losh" In-Reply-To: <4C1A8C0C.8010207@delphij.net> References: <20100617.143334.584432776655157077.imp@bsdimp.com> <4C1A8C0C.8010207@delphij.net> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org Subject: Re: Time to stop stripping binaries? 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: Thu, 17 Jun 2010 21:29:04 -0000 In message: <4C1A8C0C.8010207@delphij.net> Xin LI writes: : -----BEGIN PGP SIGNED MESSAGE----- : Hash: SHA256 : : On 2010/06/17 13:33, M. Warner Losh wrote: : > Greetings, : > : > Now that disks are big, can we stop stripping binaries by default? : > : > I've worked up a patch that lets you set WITH_BINARY_SYMBOLS or : > WITHOUT_BINARY_SYMBOLS as you see fit. We should commit it regardless : > of the outcome of this discussion (well, defaulting to yes or no : > depending on the outcome). : > : > Why symbols: it makes core dumps easier to debug. : > Why no symbols: makes the system footprint bigger. : > : > Since there's good arguments both ways, I thought I'd make this a : > knob. : : I think this is a good idea. : : A related quick question: is there any performance penalty if we ship : non-stripped binaries? I think we would probably have to map the whole : image (including the symbols) into memory? No. The symbols are tacked on the end of the file. The system only maps in the header of the binary. It then allocates virtual memory space for the various sections, and then jumps to the binary[*]. It ignores the symbols. Warner [*] Yes, I know this grossly oversimplifies things, but the other details aren't relevant to this discussion...