OSDN Git Service

Properly prefix some symbols
authorEric Andersen <andersen@codepoet.org>
Sun, 3 Nov 2002 15:01:18 +0000 (15:01 -0000)
committerEric Andersen <andersen@codepoet.org>
Sun, 3 Nov 2002 15:01:18 +0000 (15:01 -0000)
libc/sysdeps/linux/cris/sysdep.h
libc/sysdeps/linux/i960/clone.S
libc/sysdeps/linux/m68k/clone.S
libc/sysdeps/linux/sh/sysdep.h

index f905c7f..cc86d37 100644 (file)
 #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.  */
   push $r12                                            @ \
   push $r13                                            @ \
   SETUP_PIC                                            @ \
-  PLTCALL (mcount)                                     @ \
+  PLTCALL (_mcount)                                    @ \
   TEARDOWN_PIC                                         @ \
   pop  $r13                                            @ \
   pop  $r12                                            @ \
 #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_ */
index e6d504b..c6c0dc7 100644 (file)
@@ -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)
index 731587d..f2e0122 100644 (file)
@@ -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
index f88cede..9cd6c6c 100644 (file)
 #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.  */
 #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__ */