Re: glibc dladdr test failure
"John David Anglin" <[email protected]>
| Newsgroups | gmane.linux.ports.hppa |
|---|---|
| Message-ID | <[email protected]> |
> The dladdr test of the glibc testsuite fail for the following reason : > > in elf/dl-addr.c:30, the address passed is transformed this way : > const ElfW(Addr) addr = DL_LOOKUP_ADDRESS (address); > > > While in ports/sysdeps/hppa/dl-lookupcfg.h:35, you have this : > > /* Clear the bottom two bits so generic code can find the fdesc entry */ > #define DL_LOOKUP_ADDRESS(addr) \ > (_dl_lookup_address ((void *)((unsigned long)addr & ~3))) > > > If you don't apply this bitmask, addr is set to the original value of > the passed address and it is resolved correctly. > > What should be the correct fix ? I don't believe you have provided enough info regrading the cause of the failure. The PA port uses the bottom two bits for special purposes. Magic is used to compare function pointers. Be very careful with this. Changing the treatment of the bottom two bits in function pointers will break calls to/from functions in any shared library (i.e., any call that uses a fdesc). Dave -- J. David Anglin [email protected] National Research Council of Canada (613) 990-0752 (FAX: 952-6602)