static binary, dlopen, and ifunc

Samuel Thibault samuel.thibault@gnu.org
Fri Nov 13 14:45:29 GMT 2020


H.J. Lu via Libc-alpha, le ven. 13 nov. 2020 06:29:28 -0800, a ecrit:
> On Fri, Nov 13, 2020 at 6:27 AM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > We can as well avoid the problem entirely by introducing an actual
> > __mig_stpncpy function that will not pose ifunc issues. But it really
> > seems to me there can be something fishy here, not really specific to
> > the Hurd.
> 
> Functions used by init_cpu_features must not use IFUNC.

? That is unrelated.

Here the problem is that when stpncpy_ifunc_selector gets called to
relocate the stpncpy reference, _rtld_global_ro was not relocated yet,
and thus 0.

Samuel


More information about the Libc-alpha mailing list