[PATCH] elf: unconditionally add dl-static to sysdep-dl-routines in Makefile
Szabolcs Nagy
szabolcs.nagy@arm.com
Tue Apr 20 08:12:25 GMT 2021
The 03/19/2021 19:02, Florian Weimer wrote:
> * Carlos Eduardo Seo via Libc-alpha:
>
> > Building dl-static is also needed when building glibc with
> > --disable-shared.
>
> Given
>
> > # This is needed for DSO loading from static binaries.
>
> I think this suggests that ideally, the code that needs this would be
> disabled at build time, given that there is no DSO left to load in a
> static-only build.
hm, yes dynamic loading from static linked binaries is not
needed in a static only build, but i think currently we
don't distinguish a static libc.a and a "static only" libc.a
we also need to keep some elf code because static pie still
needs self relocation.
i think if it's easy to rip out the dynamic loading code,
then it makes sense to do so (assuming static pie still works)
and if it's hard then it's ok to fix --disable-shared with
minimal effort and apply the patch.
More information about the Libc-alpha
mailing list