Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 2010 15:26:30 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        d@delphij.net, delphij@delphij.net
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: Time to stop stripping binaries?
Message-ID:  <20100617.152630.460114267490874908.imp@bsdimp.com>
In-Reply-To: <4C1A8C0C.8010207@delphij.net>
References:  <20100617.143334.584432776655157077.imp@bsdimp.com> <4C1A8C0C.8010207@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <4C1A8C0C.8010207@delphij.net>
            Xin LI <delphij@delphij.net> 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...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100617.152630.460114267490874908.imp>