[PATCH v4 2/3] aarch64: avoid populating __ifunc_arg_t struct multiple times

Yury Khrustalev yury.khrustalev@arm.com
Fri Apr 25 15:50:29 GMT 2025


On Fri, Apr 25, 2025 at 01:55:32PM +0200, Florian Weimer wrote:
> * Yury Khrustalev:
> 
> > Set fields of the __ifunc_arg_t struct in elf_ifunc_invoke()
> > only once to avoid repeating this for each ifunc resolver.
> ...
> > +  static __ifunc_arg_t arg;
> > +  if (arg._size == 0)
> > +    {
> > +      arg._size = sizeof (arg);
> > +      arg._hwcap = GLRO(dl_hwcap);
> > +      arg._hwcap2 = GLRO(dl_hwcap2);
> > +      arg._hwcap3 = GLRO(dl_hwcap3);
> > +      arg._hwcap4 = GLRO(dl_hwcap4);
> > +    }
> ...
> IFUNC resolvers can be invoked concurrently with lazy binding, so this
> change is not correct, I'm afraid.

Thanks for clarification. I will drop this commit.

Kind regards,
Yury
 


More information about the Libc-alpha mailing list