]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
elf: Remove _dl_unload_cache
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 6 Jul 2026 19:36:49 +0000 (16:36 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 13 Jul 2026 16:52:07 +0000 (13:52 -0300)
It is a no-op since b9957a70b82.

Reviewed-by: DJ Delorie <dj@redhat.com>
elf/dl-cache.c
elf/dl-open.c
elf/rtld.c
sysdeps/generic/ldsodefs.h

index 03bcd5bd06ebf5915c07b1ad9d25869c16e3b56f..c6820a9f4148ccca0515ccc3dd929da7861ad9bf 100644 (file)
@@ -606,19 +606,6 @@ _dl_load_cache_lookup (const char *name)
   return result;
 }
 
-#ifndef MAP_COPY
-/* If the system does not support MAP_COPY we cannot leave the file open
-   all the time since this would create problems when the file is replaced.
-   Therefore we provide this function to close the file and open it again
-   once needed.  */
-void
-_dl_unload_cache (void)
-{
-  /* Functionality is no longer needed, but kept for internal ABI for
-     now.  */
-}
-#endif
-
 const struct tunable_header_cached *
 _dl_load_cache_tunables (const char **data)
 {
index cf4749694f9fdfb7bd3bf105fdae3ca89cc0a26c..87fcee8b0289e04b1e4d18c7a9028c210ed3d7bb 100644 (file)
@@ -898,11 +898,6 @@ no more namespaces available for dlmopen()"));
   struct dl_exception exception;
   int errcode = _dl_catch_exception (&exception, dl_open_worker, &args);
 
-#if defined USE_LDCONFIG && !defined MAP_COPY
-  /* We must unmap the cache file.  */
-  _dl_unload_cache ();
-#endif
-
   /* Do this for both the error and success cases.  The old value has
      only been determined if the namespace ID was assigned (i.e., it
      is not __LM_ID_CALLER).  In the success case, we actually may
index e5ba71fef188b744dd821e88e80b2b83570bef00..fc053df8586c95a7ad26e1fdb149c528921192a7 100644 (file)
@@ -2371,11 +2371,6 @@ dl_main (const ElfW(Phdr) *phdr,
   /* Auditing checkpoint: we have added all objects.  */
   _dl_audit_activity_nsid (LM_ID_BASE, LA_ACT_CONSISTENT);
 
-#if defined USE_LDCONFIG && !defined MAP_COPY
-  /* We must munmap() the cache file.  */
-  _dl_unload_cache ();
-#endif
-
   /* Once we return, _dl_sysdep_start will invoke
      the DT_INIT functions and then *USER_ENTRY.  */
 }
index f94247ad9fb7f8908091583efb02f04bbd36f0de..c0deb11c02ea0107b55ce8fb2ee02d420e9b3e68 100644 (file)
@@ -1151,12 +1151,6 @@ const struct r_strlenpair *_dl_important_hwcaps (const char *prepend,
    or null if none is found.  Caller must free returned string.  */
 extern char *_dl_load_cache_lookup (const char *name) attribute_hidden;
 
-/* If the system does not support MAP_COPY we cannot leave the file open
-   all the time since this would create problems when the file is replaced.
-   Therefore we provide this function to close the file and open it again
-   once needed.  */
-extern void _dl_unload_cache (void) attribute_hidden;
-
 /* System-dependent function to read a file's whole contents in the
    most convenient manner available.  *SIZEP gets the size of the
    file.  On error MAP_FAILED is returned.  */