diff options
author | 2011-04-04 12:42:39 +0000 | |
---|---|---|
committer | 2011-04-04 12:42:39 +0000 | |
commit | 9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab (patch) | |
tree | 8d94440db80d44dadc263ef20aa74460d6eae930 /lib/libc/arch/amd64 | |
parent | Better. (diff) | |
download | wireguard-openbsd-9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab.tar.xz wireguard-openbsd-9372e0f08d36e465dbbf8ed7d81cada3fa4b57ab.zip |
Move __cerror to ___cerror with a weak alias so that rthreads can override it.
On mips64, also correct the name called from plain cerror to __cerror.
"looks correct" miod@
Diffstat (limited to 'lib/libc/arch/amd64')
-rw-r--r-- | lib/libc/arch/amd64/SYS.h | 3 | ||||
-rw-r--r-- | lib/libc/arch/amd64/sys/cerror.S | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/arch/amd64/SYS.h b/lib/libc/arch/amd64/SYS.h index a4151fda209..0241cfe3927 100644 --- a/lib/libc/arch/amd64/SYS.h +++ b/lib/libc/arch/amd64/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.4 2005/12/13 00:10:48 jsg Exp $ */ +/* $OpenBSD: SYS.h,v 1.5 2011/04/04 12:42:39 guenther Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -62,6 +62,7 @@ #endif #define CERROR _C_LABEL(__cerror) +#define _CERROR _C_LABEL(___cerror) #define CURBRK _C_LABEL(__curbrk) #define _SYSCALL_NOERROR(x,y) \ diff --git a/lib/libc/arch/amd64/sys/cerror.S b/lib/libc/arch/amd64/sys/cerror.S index f5d4decfbc5..0749fdab4de 100644 --- a/lib/libc/arch/amd64/sys/cerror.S +++ b/lib/libc/arch/amd64/sys/cerror.S @@ -1,4 +1,4 @@ -/* $OpenBSD: cerror.S,v 1.4 2005/12/13 00:10:48 jsg Exp $ */ +/* $OpenBSD: cerror.S,v 1.5 2011/04/04 12:42:39 guenther Exp $ */ /* $NetBSD: cerror.S,v 1.2 2002/06/03 18:30:33 fvdl Exp $ */ /*- @@ -41,7 +41,9 @@ .globl _C_LABEL(errno) -_ENTRY(CERROR) +WEAK_ALIAS(CERROR, _CERROR) + +_ENTRY(_CERROR) #ifdef PIC movq PIC_GOT(_C_LABEL(errno)), %rcx movl %eax, (%rcx) |