diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:38:12 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-07-22 18:38:12 +0530 |
commit | 1e5a5866cb9541b5231dba3d86c8a1a35d516de9 (patch) | |
tree | 85e7ca8d6a87ee9f50ea09ccf3ec1fb91770ed16 /malloc/hooks.c | |
parent | 0552fd2c7d4e8a570cb4fe4dfe65e96f6d24b0cd (diff) | |
download | glibc-1e5a5866cb9541b5231dba3d86c8a1a35d516de9.zip glibc-1e5a5866cb9541b5231dba3d86c8a1a35d516de9.tar.gz glibc-1e5a5866cb9541b5231dba3d86c8a1a35d516de9.tar.bz2 |
Remove malloc hooks [BZ #23328]
Make malloc hooks symbols compat-only so that new applications cannot
link against them and remove the declarations from the API. Also
remove the unused malloc-hooks.h.
Finally, mark all symbols in libc_malloc_debug.so as compat so that
the library cannot be linked against.
Add a note about the deprecation in NEWS.
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.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c index 8e1afe5..2761e47 100644 --- a/malloc/hooks.c +++ b/malloc/hooks.c @@ -32,12 +32,16 @@ void weak_variable (*__after_morecore_hook) (void) = NULL; compat_symbol (libc, __after_morecore_hook, __after_morecore_hook, GLIBC_2_0); void *(*__morecore)(ptrdiff_t); compat_symbol (libc, __morecore, __morecore, GLIBC_2_0); -#endif void weak_variable (*__free_hook) (void *, const void *) = NULL; void *weak_variable (*__malloc_hook) (size_t, const void *) = NULL; void *weak_variable (*__realloc_hook) (void *, size_t, const void *) = NULL; void *weak_variable (*__memalign_hook) (size_t, size_t, const void *) = NULL; +compat_symbol (libc, __free_hook, __free_hook, GLIBC_2_0); +compat_symbol (libc, __malloc_hook, __malloc_hook, GLIBC_2_0); +compat_symbol (libc, __realloc_hook, __realloc_hook, GLIBC_2_0); +compat_symbol (libc, __memalign_hook, __memalign_hook, GLIBC_2_0); +#endif /* * Local variables: |