about summary refs log tree commit diff
path: root/malloc/tst-mallocstate.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-03-09 21:07:24 +0100
committerFlorian Weimer <fweimer@redhat.com>2021-03-09 21:07:24 +0100
commit178c0e48c3c0c65a93185b4b90bb87c4dec14dc9 (patch)
tree5d9a787d46f73c39af755fa8f2b62be7d9652f4b /malloc/tst-mallocstate.c
parent36f6e408845c8c539128f3fb9cb132bf1845a2c8 (diff)
downloadglibc-178c0e48c3c0c65a93185b4b90bb87c4dec14dc9.tar.gz
glibc-178c0e48c3c0c65a93185b4b90bb87c4dec14dc9.tar.xz
glibc-178c0e48c3c0c65a93185b4b90bb87c4dec14dc9.zip
malloc: Turn tst-mallocstate into a non-internal test
compat_symbol_reference no longer needs tests-internal.  Do not build
the test at all for newer targets, so that no spurious UNSUPPORTED
result is generated.  Use compat_symbol_reference for
__malloc_initialize_hook as well, eliminating the need for -rdynamic.

Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'malloc/tst-mallocstate.c')
-rw-r--r--malloc/tst-mallocstate.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/malloc/tst-mallocstate.c b/malloc/tst-mallocstate.c
index 776f606863..ba726505e7 100644
--- a/malloc/tst-mallocstate.c
+++ b/malloc/tst-mallocstate.c
@@ -29,8 +29,6 @@
 
 #include "malloc.h"
 
-#if TEST_COMPAT (libc, GLIBC_2_0, GLIBC_2_25)
-
 /* Make the compatibility symbols availabile to this test case.  */
 void *malloc_get_state (void);
 compat_symbol_reference (libc, malloc_get_state, malloc_get_state, GLIBC_2_0);
@@ -310,6 +308,8 @@ init_heap (void)
 
 /* Interpose the initialization callback.  */
 void (*volatile __malloc_initialize_hook) (void) = init_heap;
+compat_symbol_reference (libc, __malloc_initialize_hook,
+                         __malloc_initialize_hook, GLIBC_2_0);
 
 /* Simulate occasional unrelated heap activity in the non-dumped
    heap.  */
@@ -490,12 +490,5 @@ do_test (void)
 
   return errors;
 }
-#else
-static int
-do_test (void)
-{
-  return 77;
-}
-#endif
 
 #include <support/test-driver.c>