[PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()

Mike Frysinger vapier@gentoo.org
Sat Oct 19 06:06:00 GMT 2013


On Friday 18 October 2013 08:04:18 Guy Martin wrote:
> On 2013-10-18 12:30, Andreas Schwab wrote:
> > Guy Martin <gmsoft@tuxicoman.be> writes:
> >> To prevent this, we use instead the existing macro
> >> DL_STATIC_FUNCTION_ADDRESS() which is identical to
> >> DL_AUTO_FUNCTION_ADDRESS() but declares fptr as static.
> > 
> > Can the callers ever be reentered?
> 
> AFAICS, it can't. The macro using DL_STATIC_FUNCTION_ADDRESS() are
> DL_DT_INIT_ADDRESS() which is only used in dl-init.c and
> DL_DT_FINI_ADDRESS() used in dl-fini.c and dl-close.c.
> The only case where this might possibly be reentered would be parallel
> calls of dlopen()/dlclose(). I'm not even sure those calls are supposed
> to be thread safe.

they aren't supposed to be, but we try to make them so

how about returning a struct fdesc instead ?  sizeof(Elf(Addr)) == 
sizeof(unsigned long), and typeof(d_ptr) is already Elf(Addr).
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20131019/4e7ccea1/attachment.sig>


More information about the Libc-alpha mailing list