static binary, dlopen, and ifunc
Florian Weimer
fweimer@redhat.com
Fri Nov 13 11:29:17 GMT 2020
* Samuel Thibault via Libc-alpha:
> Samuel Thibault, le ven. 13 nov. 2020 01:00:51 +0100, a ecrit:
>> It happens that the output of the program is
>>
>> info: C locale tests
>> info: en_US.ISO-8859-1 locale tests
>> tst-idna_name_classify: Relink `/usr/src/glibc-upstream/build/mach/libmachuser.so.1' with `/usr/src/glibc-upstream/build/libc.so.0.3' for IFUNC symbol `__stpncpy'
>> Segmentation fault
>>
>> Is that perhaps what triggers the ifunc selection unexpectedly early?
>
> I realize something: libc.so "NEED"s libmachuser.so for the RPC stubs.
> 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.
Yes, this what I worried about when we discussed storing CPU features in
_rtld_global_ro. I still think it's the wrong approach, but I haven't
had the time yet to clean it up.
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list