This is the mail archive of the mailing list for the glibc 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] Fix dladdr on hppa

On 01/07/2016 02:43 PM, Mike Frysinger wrote:
> On 07 Jan 2016 06:22, Carlos O'Donell wrote:
>> On 01/02/2016 09:48 AM, John David Anglin wrote:
>>> 2016-01-02  John David Anglin  <>
>>> 	[BZ #19415]
>>> 	* sysdeps/hppa/dl-fptr.c (_dl_fixup): Declare.
>>> 	(elf_machine_resolve): New.  Return address of _dl_runtime_resolve.
>>> 	(_dl_lookup_address): Rewrite using function resolver trampoline.
>>> 	* sysdeps/hppa/dl-lookupcfg.h (DL_LOOKUP_ADDRESS): Don't clear bottom
>>> 	two bits in address.
>> Looks good to me.
>> The existing code was not ia64 specific, but it did assume that all of
>> the function descriptors were resolved before being compared, and that's
>> not a very good assumption. There were similar problems on i386 and
>> x86_64 until the compiler started loading the final symbol address from
>> the GOT and passing that to dladdr, otherwise it passed the PLT entry
>> address and that obviously causes the same problems hppa had.
>> That's the reason there is probably no test case for this because I bet
>> it also doesn't work reliable well on all the targets we support. For
>> example dlfcn/tst-dladdr.c just makes sure the various entries are
>> non-NULL in the returned struct.
> ia64 is why i was wondering about test cases -- i wanted to know if i
> needed the same fix there

Extend dlfcn/dl-addr.c to actually test the result of the call :-)


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