@@ -104,6 +104,10 @@ apply_irel (void)
# define MAIN_AUXVEC_PARAM
#endif
+#ifndef ARCH_INIT_CPU_FEATURES
+# define ARCH_INIT_CPU_FEATURES()
+#endif
+
STATIC int LIBC_START_MAIN (int (*main) (int, char **, char **
MAIN_AUXVEC_DECL),
int argc,
@@ -182,6 +186,8 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
__tunables_init (__environ);
+ ARCH_INIT_CPU_FEATURES ();
+
/* Perform IREL{,A} relocations. */
apply_irel ();
@@ -16,26 +16,13 @@
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
+# include <ldsodefs.h>
# include <cpu-features.c>
extern struct cpu_features _dl_aarch64_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_aarch64_cpu_features);
- return generic_start_main (main, argc, argv, init, fini, rtld_fini,
- stack_end);
-}
+# define ARCH_INIT_CPU_FEATURES() init_cpu_features (&_dl_aarch64_cpu_features)
+
#endif
+#include <csu/libc-start.c>
@@ -15,27 +15,14 @@
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
+#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);
-}
+#define ARCH_INIT_CPU_FEATURES() init_cpu_features (&_dl_x86_cpu_features)
+
#endif
+# include <csu/libc-start.c>