summaryrefslogtreecommitdiff
path: root/sysdeps/x86/libc-start.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86/libc-start.c')
-rw-r--r--sysdeps/x86/libc-start.c30
1 files changed, 10 insertions, 20 deletions
diff --git a/sysdeps/x86/libc-start.c b/sysdeps/x86/libc-start.c
index 3b5ea6e933..eb5335c154 100644
--- a/sysdeps/x86/libc-start.c
+++ b/sysdeps/x86/libc-start.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2015-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -15,27 +15,17 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef SHARED
-# include <csu/libc-start.c>
-# else
-/* The main work is done in the generic function. */
-# define LIBC_START_DISABLE_INLINE
-# define LIBC_START_MAIN generic_start_main
-# include <csu/libc-start.c>
+#ifndef SHARED
+/* Define I386_USE_SYSENTER to support syscall during startup in static
+ PIE. */
+# include <startup.h>
+# include <ldsodefs.h>
# include <cpu-features.h>
# include <cpu-features.c>
extern struct cpu_features _dl_x86_cpu_features;
-int
-__libc_start_main (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
- int argc, char **argv,
- __typeof (main) init,
- void (*fini) (void),
- void (*rtld_fini) (void), void *stack_end)
-{
- init_cpu_features (&_dl_x86_cpu_features);
- return generic_start_main (main, argc, argv, init, fini, rtld_fini,
- stack_end);
-}
-#endif
+# define ARCH_INIT_CPU_FEATURES() init_cpu_features (&_dl_x86_cpu_features)
+
+#endif /* !SHARED */
+#include <csu/libc-start.c>