This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] ld speedup 1/3 (suffix merge)
- From: Michael Matz <matz at suse dot de>
- To: Alan Modra <amodra at bigpond dot net dot au>
- Cc: binutils at sources dot redhat dot com, Lars Knoll <lars at trolltech dot com>
- Date: Wed, 10 Sep 2003 12:16:08 +0200 (CEST)
- Subject: Re: [patch] ld speedup 1/3 (suffix merge)
Hi,
On Wed, 10 Sep 2003, Alan Modra wrote:
> > > + const unsigned char *s = A->root.string + A->len - A->u.entsize;
> > > + const unsigned char *t = B->root.string + B->len - B->u.entsize;
> > > +
> > > + int l = A->len < B->len ? A->len : B->len;
> > > + l -= (A->u.entsize - 1);
> > > + while (l)
> >
> > This looks broken to me. The last u.entsize bytes won't be compared.
> > Mind you, I think this was broken before.
>
> I take that back. This code is only used on multi-byte strings which
> require an all-zeros terminator, not on the non-string merge case.
Yeah. We initially had not subtracted u.entsize, but '1', and ended up
with invalid sections.
Ciao,
Michael.