about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-11-17 12:20:29 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-11-17 12:20:29 +0100
commitf1d333b5bfdb3561c93feb4b5653d051c3258c59 (patch)
treea7a2e391beed00f8daa4cc826a10d0c6a26240fd /sysdeps/generic
parent8bd336a00a5311bf7a9e99b3b0e9f01ff5faa74b (diff)
downloadglibc-f1d333b5bfdb3561c93feb4b5653d051c3258c59.tar.gz
glibc-f1d333b5bfdb3561c93feb4b5653d051c3258c59.tar.xz
glibc-f1d333b5bfdb3561c93feb4b5653d051c3258c59.zip
elf: Introduce GLRO (dl_libc_freeres), called from __libc_freeres
This will be used to deallocate memory allocated using the non-minimal
malloc.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/ldsodefs.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index 1318c36dce..c26860430c 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -712,6 +712,10 @@ struct rtld_global_ro
      namespace.  */
   void (*_dl_error_free) (void *);
   void *(*_dl_tls_get_addr_soft) (struct link_map *);
+
+  /* Called from __libc_shared to deallocate malloc'ed memory.  */
+  void (*_dl_libc_freeres) (void);
+
 #ifdef HAVE_DL_DISCOVER_OSVERSION
   int (*_dl_discover_osversion) (void);
 #endif
@@ -1416,6 +1420,9 @@ __rtld_mutex_init (void)
 }
 #endif /* !PTHREAD_IN_LIBC */
 
+/* Implementation of GL (dl_libc_freeres).  */
+void __rtld_libc_freeres (void) attribute_hidden;
+
 void __thread_gscope_wait (void) attribute_hidden;
 # define THREAD_GSCOPE_WAIT() __thread_gscope_wait ()