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: [PATCH] HPPA/IA64 : Don't use broken DL_AUTO_FUNCTION_ADDRESS()


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

Attachment: signature.asc
Description: This is a digitally signed message part.


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