This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Pretty-printing plt entries on ARM
- From: Yury Gribov <y dot gribov at samsung dot com>
- To: Pavel Fedin <p dot fedin at samsung dot com>, binutils at sourceware dot org
- Cc: 'Viacheslav Garbuzov' <v dot garbuzov at samsung dot com>, 'Vasily Karpov' <v dot karpov at samsung dot com>
- Date: Fri, 07 Mar 2014 10:08:54 +0400
- Subject: Re: [PATCH] Pretty-printing plt entries on ARM
- Authentication-results: sourceware.org; auth=none
- References: <53184339 dot 1070606 at samsung dot com> <002f01cf392b$04b0b420$0e121c60$%fedin at samsung dot com> <53187093 dot 70007 at samsung dot com> <005901cf39c3$f3946b70$dabd4250$%fedin at samsung dot com>
IMHO still too much overcomplicated. In this function i always goes from 0
to count - 1, so there's no practical point in creating the array and then
deallocating it.
True but I was trying to make my implementation respect interface of
plt_sym_val callback
and this does not really say anything about iteration order.
Let's see what maintainers say.
Well, if you really want to get rid of dependence on the order of 'i'
between calls, then i would move context deallocation to the end of
_bfd_elf_get_synthetic_symtab(). Something like "if (ctx) free (ctx)".
But ctx isn't necessarily a linear array (it can be list, tree, etc.) so
free may not be enough.
I'd still prefer to deallocate inside callback.
-Y