This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [patch x64 SEH]: Sort pdata section ascending
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Binutils <binutils at sourceware dot org>, Richard Henderson <rth at redhat dot com>, Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- Date: Sat, 11 Sep 2010 12:31:23 +0100
- Subject: Re: [patch x64 SEH]: Sort pdata section ascending
- References: <AANLkTikHvWJQ7vr-zDN06ixFaSUf3t2bfoa9txUBGXSS@mail.gmail.com>
On 11/09/2010 11:14, Kai Tietz wrote:
> Hello,
>
> this patch adds feature of sorting .pdata elements ascending.
>
> ChangeLog
>
> 2010-09-11 Kai Tietz
>
> * peXXigen.c (sort_x64_pdata): New helper.
> (_bfd_XXi_final_link_postscript): Do pdata sorting.
>
> Tested for x86_64-w64-mingw32 and i686-pc-cygwin. Ok for apply?
Well, one thing ...
+sort_x64_pdata (const void *l, const void *r)
+{
+ const void *lp = ((const void *) l);
+ const void *rp = ((const void *) r);
... why are you casting those const void *s to const void *? It looks like a
thinko to me.
BTW, the fact that you can just sort all the pdata elements like that and
there's nothing to update in the testsuite... that indicates there's nothing
testing that .pdata section contents get correctly generated, doesn't it? How
would we know if the sort routine is even working at all? (Well obviously I
suppose you've checked some files manually, but this could really do with at
least a trivial dump test to make sure that the whole shebang keeps working.)
cheers,
DaveK