This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Removing duplicate DWARF2 info


On Mon, Jul 10, 2000 at 09:06:20PM -0700, Zack Weinberg wrote:
> On Mon, Jul 10, 2000 at 11:54:33PM -0400, Daniel Berlin wrote:
> > I know this has been hashed over before, but nobody ever seems to do it
> > where it needs to be done (I do it in GDB when we load the stuff), and i'm
> > guessing it's because there are three people on the planet with the
> > knowledge of how LD works that can make this happen.

I suspect it is more that people who usually work on the linker are busy, and
it hasn't filtered up yet as important.

> > Why can't we simply not emit the duplicate info, taking LD out of the
> > picture completely.
> > All it seems this would entail is keeping track of what we've emitted info
> > for, over the course of more than one file. 
> > Couldn't we have a simple persistent hash table in a file, and do a lookup
> > in that, then do the check to see if we emitted it during this
> > compilation?
> > That doesn't really seem that tricky to do, or am i missing something?
> 
> Do you want to teach every makefile in existence about this persistent
> hash table?  Which will probably require adding features to make, and
> therefore locking every makefile in existence into one implementation
> of make - which is a thing we try ridiculously hard not to do?
> 
> And don't think you can get away with not telling make about it,
> either.  Consider what happens when you clean out a build directory -
> and that's the *simplest* case.

Consider several different build trees.  You also can't assume that all objects
in a build tree are going to be linked into the same executable.  The classic
case is GCC itself, which uses logically distinct build and host compilers.

In addition, libraries may be built by other people that may include debug
information, that may or may not be the same as the information you see.

-- 
Michael Meissner, Red Hat, Inc.
PMB 198, 174 Littleton Road #3, Westford, Massachusetts 01886, USA
Work:	  meissner@redhat.com		phone: +1 978-486-9304
Non-work: meissner@spectacle-pond.org	fax:   +1 978-692-4482

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]