[PATCH] elf: Add back support for programs that do not load libc.so
Florian Weimer
fweimer@redhat.com
Fri Nov 8 15:48:16 GMT 2024
* Cristian Rodríguez:
> On Fri, Nov 8, 2024 at 10:51 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> Commit 8f8dd904c4a2207699bb666f30acceb5209c8d3f (“elf:
> rtld_multiple_ref is always true”) removed some code that happened
> to enable compatibility with programs that do not link against
> libc.so. Such programs cannot call dlopen or any dynamic linker
> functions (except __tls_get_addr), so this is not really useful.
> Still ld.so should not crash with a null-pointer dereference
> or undefined symbol reference in these cases.
>
> Perhaps adding a warning that this does not make sense somewhere.?
It's sort if implied in our dynamic linker hardening guidelines. Maybe
we have to mention explicitly there that the glibc-provided startup
files and the libc.so linker script should be used for linking. With te
official startup files, this can't happen due to the __libc_start_main
symbol dependency.
Thanks,
Florian
More information about the Libc-alpha
mailing list