[PATCH] Pretty-printing plt entries on ARM

Yury Gribov y.gribov@samsung.com
Fri Mar 7 06:08:00 GMT 2014


> 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



More information about the Binutils mailing list