Date: Tue, 22 Jun 2010 22:27:53 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: gcooper@FreeBSD.org Cc: arch@FreeBSD.org, adrian@FreeBSD.org Subject: Re: Time to stop stripping binaries? Message-ID: <20100622.222753.575506241433872327.imp@bsdimp.com> In-Reply-To: <AANLkTilk5JNhVkE7gXE4zXZbJ_AdnR7rDDec5qXMm9EU@mail.gmail.com> References: <AANLkTikny8qXkrrEVVwF0M6BoNPBl7Wu7W3MwPu2b_jc@mail.gmail.com> <AANLkTikXD-2ZKceXt5XbOdWtpa6jcyZVl7qRoROdWMno@mail.gmail.com> <AANLkTilk5JNhVkE7gXE4zXZbJ_AdnR7rDDec5qXMm9EU@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <AANLkTilk5JNhVkE7gXE4zXZbJ_AdnR7rDDec5qXMm9EU@mail.gmail.c= om> Garrett Cooper <gcooper@freebsd.org> writes: : On Tue, Jun 22, 2010 at 5:08 PM, Adrian Chadd <adrian@freebsd.org> wr= ote: : > On 23 June 2010 02:09, Garrett Cooper <gcooper@freebsd.org> wrote: : > : >>> ISTR someone pointing out that there's a "magical" (ie, I don't : >>> understand it) way to optionally have debugging symbols as extra : >>> file(s), rather than having to ship extremely large shared librar= ies : >>> by default. : >> : >> =A0 =A0See this link: : >> http://old.nabble.com/-gcc--separate-debug-infos-td21591416.html .= : >> It's similar to what I've seen some internal groups do before in t= he : >> past. : > : > People-who-know-the-build-system-well, how hard would it be to buil= d : > libraries with this option? : > : > People-who-know-binutils-and-gdb-and-relevant-libraries-well, what : > magic needs to happen to teach programs about this? (eg gdb, gprof,= : > pmcstat, etc?) : = : Speaking only for gdb, it's trivial from a user perspective to : pick up the debug symbols: : = : add-symbol-file <debug-symbols> <addr> : = : where <addr> is 0 for the application. : IIRC there are modifications that people have made to gdb to pick= : up debug symbols for libraries, but I'm a bit hazy here. I think this is an orthogonal issue to what I'm trying to accomplish. What is being suggested is a wholesale change in how we build to pass along -g<whatever> everywhere. While this has its merits, it isn't what I'm proposing. The debug symbols here are much more extensive than the simple 'don't strip' that I'm suggesting. Those symbols are just the globals that ld puts into the binary. It gives us a amount of information at a cheap cost, both in terms of implementation complexity and in terms of extra disk space. The debug info that's being proposed here is not that cheap, and quite extensive. That's why it is segregated to another file. This might be worth doing as well, but is quite a different beast. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100622.222753.575506241433872327.imp>