From 0287134396b5750243972e382db3f9e9e2138aad Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sun, 3 Nov 2002 15:01:18 +0000 Subject: Properly prefix some symbols --- libc/sysdeps/linux/cris/sysdep.h | 11 +++-------- libc/sysdeps/linux/i960/clone.S | 4 ++-- libc/sysdeps/linux/m68k/clone.S | 8 ++++---- libc/sysdeps/linux/sh/sysdep.h | 24 ++---------------------- 4 files changed, 11 insertions(+), 36 deletions(-) diff --git a/libc/sysdeps/linux/cris/sysdep.h b/libc/sysdeps/linux/cris/sysdep.h index f905c7fb3..cc86d3702 100644 --- a/libc/sysdeps/linux/cris/sysdep.h +++ b/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_ */ diff --git a/libc/sysdeps/linux/i960/clone.S b/libc/sysdeps/linux/i960/clone.S index e6d504bb7..c6c0dc73a 100644 --- a/libc/sysdeps/linux/i960/clone.S +++ b/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) diff --git a/libc/sysdeps/linux/m68k/clone.S b/libc/sysdeps/linux/m68k/clone.S index 731587db4..f2e0122da 100644 --- a/libc/sysdeps/linux/m68k/clone.S +++ b/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 diff --git a/libc/sysdeps/linux/sh/sysdep.h b/libc/sysdeps/linux/sh/sysdep.h index f88cedefb..9cd6c6cfa 100644 --- a/libc/sysdeps/linux/sh/sysdep.h +++ b/libc/sysdeps/linux/sh/sysdep.h @@ -21,19 +21,7 @@ #include /* 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__ */ -- cgit v1.2.3