Browse Source

Properly prefix some symbols

Eric Andersen 21 years ago
parent
commit
0287134396

+ 3 - 8
libc/sysdeps/linux/cris/sysdep.h

@@ -107,10 +107,10 @@
 #define PSEUDO_END(name) \
 0:                          @ \
   SETUP_PIC                     @ \
-  PLTJUMP (syscall_error)               @ \
+  PLTJUMP (__syscall_error)               @ \
   END (name)
 
-/* If compiled for profiling, call `mcount' at the start of each function.
+/* If compiled for profiling, call `_mcount' at the start of each function.
    FIXME: Note that profiling is not actually implemented.  This is just
    example code which might not even compile, though it is believed to be
    correct.  */
@@ -123,7 +123,7 @@
   push	$r12						@ \
   push	$r13						@ \
   SETUP_PIC						@ \
-  PLTCALL (mcount)					@ \
+  PLTCALL (_mcount)					@ \
   TEARDOWN_PIC						@ \
   pop	$r13						@ \
   pop	$r12						@ \
@@ -135,11 +135,6 @@
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif
 
-/* Since C identifiers are not normally prefixed with an underscore
-   on this system, the asm identifier `syscall_error' intrudes on the
-   C name space.  Make sure we use an innocuous name.  */
-#define	syscall_error	__syscall_error
-#define mcount		_mcount
 
 #endif /* __ASSEMBLER__ */
 #endif /* _SYSDEP_H_ */

+ 2 - 2
libc/sysdeps/linux/i960/clone.S

@@ -44,11 +44,11 @@ __clone:
         calls   0
 
         /* Do the system call */
-        cmpibg  0, g0, syscall_error    /* if < 0, error */
+        cmpibg  0, g0, __syscall_error    /* if < 0, error */
         be      thread_start            /* if == 0, we're the child */
         ret                             /* we're the parent */
 
-syscall_error:
+__syscall_error:
         not     g0, r3
         callx   ___errno_location
         st      r3, (g0)

+ 4 - 4
libc/sysdeps/linux/m68k/clone.S

@@ -23,11 +23,11 @@ __clone:
 	movel   4(%sp), %d1             /* no NULL function pointers */
 	movel	%d1, %a0
 	tstl    %d1
-	beq.w   syscall_error
+	beq.w   __syscall_error
 	movel   8(%sp), %d1             /* no NULL stack pointers */
 	movel	%d1, %a1
 	tstl    %d1
-	beq.w   syscall_error
+	beq.w   __syscall_error
 
 	/* Allocate space and copy the argument onto the new stack.  */
 	movel   16(%sp), -(%a1)
@@ -52,12 +52,12 @@ __clone:
 #endif
 
 	tstl    %d0
-	bmi.w   syscall_error
+	bmi.w   __syscall_error
 	beq.w   thread_start
 
 	rts
 
-syscall_error:
+__syscall_error:
 	negl	%d0
 	movel	%d0, %sp@-
 	lea		__errno_location-.-8, %a0

+ 2 - 22
libc/sysdeps/linux/sh/sysdep.h

@@ -21,19 +21,7 @@
 #include <bits/uClibc_config.h>
 
 /* Define a macro we can use to construct the asm name for a C symbol.  */
-#ifdef	__NO_UNDERSCORES__
-#ifdef	__STDC__
-#define C_LABEL(name)		name##:
-#else
-#define C_LABEL(name)		name/**/:
-#endif
-#else
-#ifdef	__STDC__
-#define C_LABEL(name)		_##name##:
-#else
-#define C_LABEL(name)		_/**/name/**/:
-#endif
-#endif
+#define C_LABEL(name) __C_SYMBOL_PREFIX__ name
 
 /* Mark the end of function named SYM.  This is used on some platforms
    to generate correct debugging information.  */
@@ -88,19 +76,11 @@
 #define END(name)							      \
   ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(name))
 
-/* If compiled for profiling, call `mcount' at the start of each function.  */
+/* If compiled for profiling, call `_mcount' at the start of each function.  */
 #ifdef	PROF
 #define CALL_MCOUNT	/* NOTYET */
 #else
 #define CALL_MCOUNT		/* Do nothing.  */
 #endif
 
-#ifdef	__NO_UNDERSCORES__
-/* Since C identifiers are not normally prefixed with an underscore
-   on this system, the asm identifier `syscall_error' intrudes on the
-   C name space.  Make sure we use an innocuous name.  */
-#define	syscall_error	__syscall_error
-#define mcount		_mcount
-#endif
-
 #endif	/* __ASSEMBLER__ */