[PATCH] Eliminate duplicate dwarf2 data
Sun Aug 27 09:42:00 GMT 2000
On Sun, 27 Aug 2000, Andi Kleen wrote:
> On Sun, Aug 27, 2000 at 08:27:06AM -0700, Daniel Berlin wrote:
> > >
> > > So it'll break when you have a hash collision ? (even MD5 can have
> > > collisions...)
> > Also, let's not forget how many other important things on your system
> > depend on MD5 not colliding before the sun explodes.
> Nothing depends on it AFAIK. Name anything that does. A lot of stuff
> depends on nobody being able to produce collisions arbitarily, but not
> on that they never occur.
This is almost the same way.
It's completely infeasible for someone to produce debug info that
Every input bit affects every output bit.
You aren't thinking this through.
Not only would you have to have a collission, it would have to occur
between two files named exactly the same (since that's also part of the
section name, which end up being
".gnu.linkonce.wi.DW.stl_hash_fun.h.59661ddf.0" ), and with the
exact same number of DIEs. This is not possible to generate accidently.
You'd have to specifically be trying.
> > I'd rather see you produce a collision, than complain it's possible.
> I just dislike solutions that only work 99.999% of all times (I know
> it is a few more nines in this case)
If you can make the linker remove duplicates, feel free.
I tried, I failed.
I believe that given the constraints (two files with the exact same name,
same number of dies, same checksum, different debug info), it's not
possible to generate this accidently.
> Would it be possible for the linker to compare the whole record before
> deleting something ?
If i could get that code working, i wouldn't have done the checksum in
the compiler. I spent a month trying, however, before giving up.
Maybe LD and BFD are just too confusing for me to grasp.
> > -Andi
More information about the Gcc-patches