aboutsummaryrefslogtreecommitdiff
path: root/elf/libc_early_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/libc_early_init.c')
-rw-r--r--elf/libc_early_init.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/libc_early_init.c b/elf/libc_early_init.c
index 0720231..4da170a 100644
--- a/elf/libc_early_init.c
+++ b/elf/libc_early_init.c
@@ -24,6 +24,7 @@
#include <pthread_early_init.h>
#include <sys/single_threaded.h>
#include <getrandom-internal.h>
+#include <malloc/malloc-internal.h>
#ifdef SHARED
_Bool __libc_initial;
@@ -49,4 +50,7 @@ __libc_early_init (_Bool initial)
#if ENABLE_ELISION_SUPPORT
__lll_elision_init ();
#endif
+
+ /* Initialize system malloc (needs __libc_initial to be set). */
+ call_function_static_weak (__ptmalloc_init);
}