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: Alan Modra <amodra at bigpond dot net dot au>
- To: Michael Matz <matz at suse dot de>
- Cc: binutils at sources dot redhat dot com, Lars Knoll <lars at trolltech dot com>
- Date: Wed, 10 Sep 2003 13:54:57 +0930
- Subject: Re: [patch] ld speedup 1/3 (suffix merge)
- References: <20030909150800.GU1443@bubble.modra.org><Pine.LNX.4.44.0309091743500.13736-100000@wotan.suse.de>
On Tue, Sep 09, 2003 at 06:06:06PM +0200, Michael Matz wrote:
> Index: merge.c
> +static int
> +strrevcmp (const void *a, const void *b)
> +{
> + struct sec_merge_hash_entry *A = *(struct sec_merge_hash_entry **) a;
> + struct sec_merge_hash_entry *B = *(struct sec_merge_hash_entry **) b;
> +
> + 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.
--
Alan Modra
IBM OzLabs - Linux Technology Centre