This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch x64 SEH]: Sort pdata section ascending


2010/9/11 Andreas Schwab <schwab@linux-m68k.org>:
> 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."
>

Of course I can. It is valid gcc compatible code and it does what it should do.

Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]