[patch x64 SEH]: Sort pdata section ascending
Dave Korn
dave.korn.cygwin@gmail.com
Sat Sep 11 13:14:00 GMT 2010
On 11/09/2010 14:04, Andreas Schwab wrote:
> 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.
Oh, well spotted. That's a GNU extension, which would be why GCC didn't
complain.
cheers,
DaveK
More information about the Binutils
mailing list