From 9a1fab59e7d5d993760224b250a8b52d30f58952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= Date: Fri, 27 Mar 2015 21:22:01 +0100 Subject: [PATCH] loader: Run checks also on ARM Linux. --- loader/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/loader/main.c b/loader/main.c index ce2117330a2..bb752b5b097 100644 --- a/loader/main.c +++ b/loader/main.c @@ -109,8 +109,9 @@ static void check_command_line( int argc, char *argv[] ) } -#if defined(__linux__) && defined(__i386__) +#if defined(__linux__) && (defined(__i386__) || defined(__arm__)) +#ifdef __i386__ /* separate thread to check for NPTL and TLS features */ static void *needs_pthread( void *arg ) { @@ -140,6 +141,11 @@ static void check_threading(void) pthread_join( id, &ret ); if (!ret) exit(1); } +#else +static void check_threading(void) +{ +} +#endif static void check_vmsplit( void *stack ) { @@ -171,7 +177,11 @@ static int pre_exec(void) check_threading(); check_vmsplit( &temp ); set_max_limit( RLIMIT_AS ); - return 1; +#ifdef __i386__ + return 1; /* we have a preloader on x86 */ +#else + return 0; +#endif } #elif defined(__linux__) && defined(__x86_64__)