about summary refs log tree commit diff
path: root/csu
diff options
context:
space:
mode:
Diffstat (limited to 'csu')
-rw-r--r--csu/init-first.c2
-rw-r--r--csu/libc-start.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/csu/init-first.c b/csu/init-first.c
index 77c6e1cb9e..465f25b722 100644
--- a/csu/init-first.c
+++ b/csu/init-first.c
@@ -72,8 +72,6 @@ _init (int argc, char **argv, char **envp)
   __environ = envp;
 
 #ifndef SHARED
-  __libc_init_secure ();
-
   /* First the initialization which normally would be done by the
      dynamic linker.  */
   _dl_non_dynamic_init ();
diff --git a/csu/libc-start.c b/csu/libc-start.c
index cc59073abe..15db9b4684 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -21,6 +21,9 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <exit-thread.h>
+#include <libc-internal.h>
+
+#include <elf/dl-tunables.h>
 
 extern void __libc_init_first (int argc, char **argv, char **envp);
 
@@ -174,6 +177,11 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
         }
     }
 
+  /* Initialize very early so that tunables can use it.  */
+  __libc_init_secure ();
+
+  __tunables_init (__environ);
+
   /* Perform IREL{,A} relocations.  */
   apply_irel ();