[patch x64 SEH]: Sort pdata section ascending
Kai Tietz
ktietz70@googlemail.com
Tue Sep 14 17:18:00 GMT 2010
2010/9/14 Richard Henderson <rth@redhat.com>:
> Watch your indentation; it's incorrect for both the comment
> and the code. Although the code indentation will be correct
> once you wrap the new { } around it.
Yeah, moved it down (again).
>> + bfd_size_type x = sec->rawsize ? sec->rawsize : sec->size;
> ...
>> + qsort (contents, (size_t) ((sec->size <x ? sec->size : x) / 12), 12, sort_x64_pdata);
>
> I wonder if some sort of error/warning should be generated
> for section size incorrect. When is rawsize != size here?
Well, as padding of pdata is allowed by zero values, we shouldn't warn
here IMHO.
>> + if (!x || !bfd_get_section_contents (abfd, sec, pfinfo->contents, 0, x))
> ...
>> + if (contents && x != 0)
>
> Merge this into a single IF statement.
Ok, done.
Updated patch attached.
Regards,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sort_pdata.diff
Type: application/octet-stream
Size: 1876 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20100914/e1e07edf/attachment.obj>
More information about the Binutils
mailing list