NetBSD/lib/libc/arch/powerpc/sys/cerror.S
kleink 6348b7d5b5 * On architectures using ELF, and conditionally on those in transition, rename
_ASM_LABEL(cerror) and _ASM_LABEL(curbrk) to _C_LABEL(__cerror) and
_C_LABEL(__curbrk) (or their respective architecture-specific equivalents) to
avoid possible name clashes with identifiers used in user applications.
* Do the same for minbrk on all architectures to avoid a GCC-specific (and
on ELF architectures effectively useless) symbol reference renaming in MI code.
1999-01-14 22:48:18 +00:00

24 lines
372 B
ArmAsm

/* $NetBSD: cerror.S,v 1.4 1999/01/14 22:48:21 kleink Exp $ */
#include <machine/asm.h>
#include "SYS.h"
/* XXX _REENTRANT */
.globl _C_LABEL(errno)
ENTRY(__cerror)
#ifdef PIC
mflr 10
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr 4
lwz 4,_C_LABEL(errno)@got(4)
stw 3,0(4)
mtlr 10
#else
lis 4,_C_LABEL(errno)@ha
stw 3,_C_LABEL(errno)@l(4)
#endif
li 3,-1
li 4,-1
blr