Pass relocated address to tdep_get_func_addr
Pass relocated address to tdep_get_func_addr

The ppc64 implementation of tdep_get_func_addr would crash when
attempting to retrieve the address of a function in a shared
library.  The problem was that it needs to dereference the
function descriptor, but common code was passing the *unrelocated*
adddress of the descriptor to the tdep_get_func_addr routine.

Instead, common code would attempt to relocate the *result* of
tdep_get_func_addr, which is also wrong: the ppc64 implementation
reads the function address from the in-memory copy of the
descriptor, which is already relocation and contains the final
address.

This patch fixes the problem by relocating the descriptor address
before passing it to tdep_get_func_addr, instead of relocating
the result of tdep_get_func_addr.  Since ppc64 is the only
non-trivial implementation of tdep_get_func_addr, this cannot
affect any other platform.

Signed-off-by: Ulrich Weigand <91db8f0c9669aab7aaac0665fcc1b4d115bc788f@de.ibm.com>

Chilledheart/libunwind,bo-on-software/libunwind,dreal-deps/libunwind,rntz/libunwind,project-zerus/libunwind,Chilledheart/libunwind,unkadoug/libunwind,mpercy/libunwind,Chilledheart/libunwind,vegard/libunwind,dagar/libunwind,frida/libunwind,bo-on-software/libunwind,dreal-deps/libunwind,joyent/libunwind,atanasyan/libunwind,evaautomation/libunwind,mpercy/libunwind,rantala/libunwind,wdv4758h/libunwind,tony/libunwind,dagar/libunwind,evaautomation/libunwind,zliu2014/libunwind-tilegx,project-zerus/libunwind,martyone/libunwind,libunwind/libunwind,yuyichao/libunwind,fdoray/libunwind,vegard/libunwind,wdv4758h/libunwind,evaautomation/libunwind,djwatson/libunwind,yuyichao/libunwind,unkadoug/libunwind,vtjnash/libunwind,igprof/libunwind,mpercy/libunwind,dagar/libunwind,fillexen/libunwind,djwatson/libunwind,vegard/libunwind,tony/libunwind,dropbox/libunwind,joyent/libunwind,zliu2014/libunwind-tilegx,project-zerus/libunwind,martyone/libunwind,igprof/libunwind,vtjnash/libunwind,pathscale/libunwind,libunwind/libunwind,dropbox/libunwind,rantala/libunwind,rntz/libunwind,joyent/libunwind,krytarowski/libunwind,dreal-deps/libunwind,atanasyan/libunwind,rogwfu/libunwind,krytarowski/libunwind,tkelman/libunwind,zliu2014/libunwind-tilegx,unkadoug/libunwind,krytarowski/libunwind,atanasyan/libunwind,dropbox/libunwind,rantala/libunwind,libunwind/libunwind,pathscale/libunwind,martyone/libunwind,rogwfu/libunwind,pathscale/libunwind,tkelman/libunwind,yuyichao/libunwind,fdoray/libunwind,tony/libunwind,frida/libunwind,frida/libunwind,bo-on-software/libunwind,tkelman/libunwind,fillexen/libunwind,vtjnash/libunwind,rogwfu/libunwind,djwatson/libunwind,rntz/libunwind,wdv4758h/libunwind,fillexen/libunwind,fdoray/libunwind,igprof/libunwind