This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix dladdr on hppa
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: John David Anglin <dave dot anglin at bell dot net>, GNU C Library <libc-alpha at sourceware dot org>, Helge Deller <deller at gmx dot de>
- Date: Thu, 7 Jan 2016 15:02:33 -0500
- Subject: Re: [PATCH] Fix dladdr on hppa
- Authentication-results: sourceware.org; auth=none
- References: <6F97DB2A-5F4F-4C30-9F7C-395E49DB18FA at bell dot net> <568E4A89 dot 9020704 at redhat dot com> <20160107194301 dot GA25548 at vapier dot lan>
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 <danglin@gcc.gnu.org>
>>>
>>> [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 :-)
c.