[patch x64 SEH]: Sort pdata section ascending

Andreas Schwab schwab@linux-m68k.org
Sat Sep 11 13:05:00 GMT 2010
Kai Tietz <ktietz70@googlemail.com> writes:

> Index: src/bfd/peXXigen.c
> ===================================================================
> --- src.orig/bfd/peXXigen.c	2010-09-07 21:55:15.000000000 +0200
> +++ src/bfd/peXXigen.c	2010-09-11 13:17:30.547535100 +0200
> @@ -2256,6 +2256,24 @@ _bfd_XX_get_symbol_info (bfd * abfd, asy
>    coff_get_symbol_info (abfd, symbol, ret);
>  }
>  
> +#if !defined(COFF_WITH_pep) && defined(COFF_WITH_pex64)
> +static int
> +sort_x64_pdata (const void *lp, const void *rp)
> +{
> +  bfd_vma vl, vr;
> +  vl = bfd_getl32 (lp); vr = bfd_getl32 (rp);
> +  if (vl != vr)
> +    return (vl < vr ? -1 : 1);
> +  vl = bfd_getl32 (lp + 4); vr = bfd_getl32 (rp + 4);
> +  if (vl != vr)
> +    return (vl < vr ? -1 : 1);
> +  vl = bfd_getl32 (lp + 8); vr = bfd_getl32 (rp + 8);

You can't do arithmetics on pointers to void.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Binutils mailing list