static binary, dlopen, and ifunc

Samuel Thibault samuel.thibault@gnu.org
Fri Nov 13 15:30:22 GMT 2020


Andreas Schwab, le ven. 13 nov. 2020 16:16:03 +0100, a ecrit:
> On Nov 13 2020, Samuel Thibault via Libc-alpha wrote:
> > I realize something: libc.so "NEED"s libmachuser.so for the RPC stubs.
> 
> Does that mean you have a dependency cycle?

Yes.

> > So I guess the linker is here relocating libmachuser.so first, and here
> > trying to select for __stpncpy before libc.so is relocated. I guess I
> > need a way to make libmachuser.so only use non-ifunc functions so its
> > relocation can proceed before that of libc.so.
> 
> Like rtld-foo sources for ld.so, you need libmachuser-foo sources that
> explicitly do not use ifunc.

That's what I was proposing in another mail: add a __mig_stpncpy to
libc.so, that libmachuser can then safely call.

Samuel


More information about the Libc-alpha mailing list