From 39bd9ff670e552f33fc11e7513b63b86a75ee542 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 29 Jan 2020 00:17:05 +0900 Subject: [PATCH] sim: Prefix symbols with _ for non-ELF Namely for Mach-O. Leave __CYGWIN__ case as it is. --- arch/sim/src/sim/up_setjmp32.S | 4 ++++ arch/sim/src/sim/up_setjmp64.S | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/arch/sim/src/sim/up_setjmp32.S b/arch/sim/src/sim/up_setjmp32.S index a1b72840f8..13b202e63c 100644 --- a/arch/sim/src/sim/up_setjmp32.S +++ b/arch/sim/src/sim/up_setjmp32.S @@ -46,8 +46,12 @@ #ifdef __CYGWIN__ # define SYMBOL(s) _##s #else +#ifdef __ELF__ +# define SYMBOL(s) _##s +#else # define SYMBOL(s) s #endif +#endif /************************************************************************** * Public Functions diff --git a/arch/sim/src/sim/up_setjmp64.S b/arch/sim/src/sim/up_setjmp64.S index af7449a9f2..0e1063ba63 100644 --- a/arch/sim/src/sim/up_setjmp64.S +++ b/arch/sim/src/sim/up_setjmp64.S @@ -81,7 +81,11 @@ //# define SYMBOL(s) _##s # define SYMBOL(s) s #else +#ifdef __ELF__ # define SYMBOL(s) s +#else +# define SYMBOL(s) _##s +#endif #endif /**************************************************************************