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


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


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