aboutsummaryrefslogtreecommitdiff
path: root/csu
diff options
context:
space:
mode:
Diffstat (limited to 'csu')
-rw-r--r--csu/init-first.c4
-rw-r--r--csu/libc-start.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/csu/init-first.c b/csu/init-first.c
index 264e6f3..d214af7 100644
--- a/csu/init-first.c
+++ b/csu/init-first.c
@@ -16,7 +16,6 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -75,9 +74,6 @@ _init_first (int argc, char **argv, char **envp)
__init_misc (argc, argv, envp);
- /* Initialize ctype data. */
- __ctype_init ();
-
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
diff --git a/csu/libc-start.c b/csu/libc-start.c
index 12468c5..ccc743c 100644
--- a/csu/libc-start.c
+++ b/csu/libc-start.c
@@ -22,6 +22,7 @@
#include <ldsodefs.h>
#include <exit-thread.h>
#include <libc-internal.h>
+#include <elf/libc-early-init.h>
#include <elf/dl-tunables.h>
@@ -238,6 +239,10 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
__cxa_atexit ((void (*) (void *)) rtld_fini, NULL, NULL);
#ifndef SHARED
+ /* Perform early initialization. In the shared case, this function
+ is called from the dynamic loader as early as possible. */
+ __libc_early_init ();
+
/* Call the initializer of the libc. This is only needed here if we
are compiling for the static library in which case we haven't
run the constructors in `_dl_start_user'. */