This is the mail archive of the libc-alpha@sourceware.org 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: dladdr(): adventure in ABIs, function descriptors in IA-64 and HPPA vs PPC64 ELFv1


On 6/26/19 1:39 PM, Yann Droneaud wrote:
> Unlike with PowerPC 64 bits ELFv1 ABI where function descriptor and
> function implementation lead to the same symbol, it seems on HPPA,
> dladdr(dlsym(RTLD_DEFAULT, "symbol"), &info) doesn't return a matching
> symbol: info.dli_sname and info.dli_saddr are both NULL.

This should have worked.

dladdr -> DL_LOOKUP_ADDRESS -> fptr -> target ip of the descriptor.
 
The relevant resolution routine is sysdeps/hppa/dl-fptr.c (_dl_lookup_address).

If that isn't being triggered then there is a bug.

> Having dladdr() being unable to match a pointer to a function
> descriptor to its symbol name and address is a pity.

It should work.

> That makes creating a test case for my changes a bit more challenging.
> 
> Anyway dladdr() works for an address in the function, so backtraces can
> be generated, that's probably the only use case that matter ?
> 
> What do you think ? Should I open a bug for that ?

Please open a bug if there isn't one open already.

I'm about a month away from having my hppa box back online, and you really
need a real box to debug this. I'm surprised qemu is working for you :-)

Dave,

Do you have a box I can ssh to and borrow to test this?

-- 
Cheers,
Carlos.


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