about summary refs log tree commit diff
path: root/malloc/hooks.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:37:54 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-22 18:37:54 +0530
commit57b07bede12635bd6d6aa0e488824bb510bbeca4 (patch)
treedc4731058938f8a5000a9745e868bd08ff7c9955 /malloc/hooks.c
parent0075c4f39dcc53025103e2919aa74b02f776c1d2 (diff)
downloadglibc-57b07bede12635bd6d6aa0e488824bb510bbeca4.tar.gz
glibc-57b07bede12635bd6d6aa0e488824bb510bbeca4.tar.xz
glibc-57b07bede12635bd6d6aa0e488824bb510bbeca4.zip
Remove __after_morecore_hook
Remove __after_morecore_hook from the API and finalize the symbol so
that it can no longer be used in new applications.  Old applications
using __after_morecore_hook will find that their hook is no longer
called.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r--malloc/hooks.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c
index daa5c7cfae..45c91d6502 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -17,6 +17,11 @@
    License along with the GNU C Library; see the file COPYING.LIB.  If
    not, see <https://www.gnu.org/licenses/>.  */
 
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_34)
+void weak_variable (*__after_morecore_hook) (void) = NULL;
+compat_symbol (libc, __after_morecore_hook, __after_morecore_hook, GLIBC_2_0);
+#endif
+
 /* Hooks for debugging versions.  The initial hooks just call the
    initialization routine, then do the normal work. */