Time to stop stripping binaries?

M. Warner Losh imp at bsdimp.com
Thu Jun 17 21:29:04 UTC 2010


In message: <4C1A8C0C.8010207 at delphij.net>
            Xin LI <delphij at 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...


More information about the freebsd-arch mailing list