1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

elf: Merge __dl_libc_freemem into __rtld_libc_freeres

The functions serve very similar purposes.  The advantage of
__rtld_libc_freeres is that it is located within ld.so, so it is
more natural to poke at link map internals there.

This slightly regresses cleanup capabilities for statically linked
binaries.  If that becomes a problem, we should start calling
__rtld_libc_freeres from __libc_freeres (perhaps after renaming it).
This commit is contained in:
Florian Weimer
2025-02-02 20:10:09 +01:00
parent 749310c61b
commit d12cb8e452
4 changed files with 101 additions and 110 deletions

View File

@@ -28,7 +28,6 @@
# pragma weak __nss_module_freeres
# pragma weak __nss_action_freeres
# pragma weak __nss_database_freeres
# pragma weak __dl_libc_freemem
# pragma weak __hdestroy
# pragma weak __gconv_cache_freemem
# pragma weak __gconv_conf_freemem
@@ -136,7 +135,6 @@ __libc_freeres (void)
_IO_cleanup ();
/* We run the resource freeing after IO cleanup. */
call_function_static_weak (__dl_libc_freemem);
call_function_static_weak (__hdestroy);
call_function_static_weak (__gconv_cache_freemem);
call_function_static_weak (__gconv_conf_freemem);