Ver código fonte

Correct C_SYMBOL_PREFIX handling for asm, supports only none or _

Peter S. Mazinger 19 anos atrás
pai
commit
2f7571c9b6
2 arquivos alterados com 9 adições e 1 exclusões
  1. 4 0
      Rules.mak
  2. 5 1
      include/libc-internal.h

+ 4 - 0
Rules.mak

@@ -400,6 +400,10 @@ ifneq ($(DOASSERTS),y)
 CFLAGS+=-DNDEBUG
 endif
 
+ifneq ($(strip $(C_SYMBOL_PREFIX)),"")
+CFLAGS+=-D__SYMBOL_PREFIX=1
+endif
+
 # moved from ldso/{ldso,libdl}
 # BEWARE!!! At least mips* will die if -O0 is used!!!
 ifeq ($(TARGET_ARCH),mips)

+ 5 - 1
include/libc-internal.h

@@ -47,7 +47,11 @@
 
 #else /* __ASSEMBLER__ */
 
-# define C_SYMBOL_NAME(name) __C_SYMBOL_PREFIX__ ##name
+#ifdef __SYMBOL_PREFIX
+# define C_SYMBOL_NAME(name) _##name
+#else
+# define C_SYMBOL_NAME(name) name
+#endif
 
 # define strong_alias(name, aliasname)					\
   .global C_SYMBOL_NAME (aliasname) ;					\