From 85a46bf5994d044bc3b0371a7e47b272428cd375 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Fri, 7 Jul 2023 12:20:04 +0300 Subject: [PATCH] arch/sim: unify usage for SYMBOL macro Signed-off-by: Petro Karashchenko --- arch/sim/src/sim/sim_vfork_arm64.S | 8 +++++--- arch/sim/src/sim/sim_vfork_x86.S | 6 +++--- arch/sim/src/sim/sim_vfork_x86_64.S | 6 +++--- libs/libc/machine/sim/arch_setjmp_arm64.S | 8 +++++--- libs/libc/machine/sim/arch_setjmp_x86.S | 6 +++--- libs/libc/machine/sim/arch_setjmp_x86_64.S | 6 +++--- 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/arch/sim/src/sim/sim_vfork_arm64.S b/arch/sim/src/sim/sim_vfork_arm64.S index f0064ef1e5..cf3ec07db0 100644 --- a/arch/sim/src/sim/sim_vfork_arm64.S +++ b/arch/sim/src/sim/sim_vfork_arm64.S @@ -29,10 +29,12 @@ * Pre-processor Definitions ***************************************************************************/ -#if defined(CONFIG_HOST_MACOS) - #define SYMBOL(x) _##x +#ifdef __CYGWIN__ +# define SYMBOL(s) _##s +#elif defined(__ELF__) +# define SYMBOL(s) s #else - #define SYMBOL(x) x +# define SYMBOL(s) _##s #endif /**************************************************************************** diff --git a/arch/sim/src/sim/sim_vfork_x86.S b/arch/sim/src/sim/sim_vfork_x86.S index ff728247c3..855831c475 100644 --- a/arch/sim/src/sim/sim_vfork_x86.S +++ b/arch/sim/src/sim/sim_vfork_x86.S @@ -30,11 +30,11 @@ ************************************************************************************/ #ifdef __CYGWIN__ -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #elif defined(__ELF__) -# define SYMBOL(s) s +# define SYMBOL(s) s #else -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #endif /************************************************************************************ diff --git a/arch/sim/src/sim/sim_vfork_x86_64.S b/arch/sim/src/sim/sim_vfork_x86_64.S index bf1ec71d5d..2334873d4a 100644 --- a/arch/sim/src/sim/sim_vfork_x86_64.S +++ b/arch/sim/src/sim/sim_vfork_x86_64.S @@ -30,11 +30,11 @@ ************************************************************************************/ #ifdef __CYGWIN__ -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #elif defined(__ELF__) -# define SYMBOL(s) s +# define SYMBOL(s) s #else -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #endif /************************************************************************************ diff --git a/libs/libc/machine/sim/arch_setjmp_arm64.S b/libs/libc/machine/sim/arch_setjmp_arm64.S index e3f06a1a2e..fea6140dc4 100644 --- a/libs/libc/machine/sim/arch_setjmp_arm64.S +++ b/libs/libc/machine/sim/arch_setjmp_arm64.S @@ -29,10 +29,12 @@ * Pre-processor Definitions ****************************************************************************/ -#if defined(CONFIG_HOST_MACOS) - #define SYMBOL(x) _##x +#ifdef __CYGWIN__ +# define SYMBOL(s) _##s +#elif defined(__ELF__) +# define SYMBOL(s) s #else - #define SYMBOL(x) x +# define SYMBOL(s) _##s #endif /**************************************************************************** diff --git a/libs/libc/machine/sim/arch_setjmp_x86.S b/libs/libc/machine/sim/arch_setjmp_x86.S index bae205f365..e9bdef6a05 100644 --- a/libs/libc/machine/sim/arch_setjmp_x86.S +++ b/libs/libc/machine/sim/arch_setjmp_x86.S @@ -29,11 +29,11 @@ **************************************************************************/ #ifdef __CYGWIN__ -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #elif defined(__ELF__) -# define SYMBOL(s) s +# define SYMBOL(s) s #else -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #endif /************************************************************************** diff --git a/libs/libc/machine/sim/arch_setjmp_x86_64.S b/libs/libc/machine/sim/arch_setjmp_x86_64.S index 893dc1fe82..0dccb23980 100644 --- a/libs/libc/machine/sim/arch_setjmp_x86_64.S +++ b/libs/libc/machine/sim/arch_setjmp_x86_64.S @@ -63,11 +63,11 @@ #endif #ifdef __CYGWIN__ -# define SYMBOL(s) s +# define SYMBOL(s) _##s #elif defined(__ELF__) -# define SYMBOL(s) s +# define SYMBOL(s) s #else -# define SYMBOL(s) _##s +# define SYMBOL(s) _##s #endif /**************************************************************************