diff options
Diffstat (limited to 'lib/libc/arch/vax')
-rw-r--r-- | lib/libc/arch/vax/DEFS.h | 25 | ||||
-rw-r--r-- | lib/libc/arch/vax/SYS.h | 4 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/bcmp.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/bcopy.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/bzero.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/ffs.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/memcmp.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/memcpy.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/memmove.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/memset.S | 3 | ||||
-rw-r--r-- | lib/libc/arch/vax/string/strchr.S | 3 |
11 files changed, 44 insertions, 12 deletions
diff --git a/lib/libc/arch/vax/DEFS.h b/lib/libc/arch/vax/DEFS.h index 415e86df113..13e0859dfa6 100644 --- a/lib/libc/arch/vax/DEFS.h +++ b/lib/libc/arch/vax/DEFS.h @@ -1,4 +1,27 @@ -/* $OpenBSD: DEFS.h,v 1.4 1996/08/19 08:18:17 tholo Exp $ */ +/* $OpenBSD: DEFS.h,v 1.5 2015/08/31 02:53:57 guenther Exp $ */ #include <machine/asm.h> +/* + * We define a hidden alias with the prefix "_libc_" for each global symbol + * that may be used internally. By referencing _libc_x instead of x, other + * parts of libc prevent overriding by the application and avoid unnecessary + * relocations. + */ +#define _HIDDEN(x) _libc_##x +#define _HIDDEN_ALIAS(x,y) \ + STRONG_ALIAS(_HIDDEN(x),y); \ + .hidden _HIDDEN(x) +#define _HIDDEN_FALIAS(x,y) \ + _HIDDEN_ALIAS(x,y); \ + .type _HIDDEN(x),@function + +/* + * For functions implemented in ASM that aren't syscalls. + * END_STRONG(x) Like DEF_STRONG() in C; for standard/reserved C names + * END_WEAK(x) Like DEF_WEAK() in C; for non-ISO C names + */ +#define END_STRONG(x) END(x); _HIDDEN_FALIAS(x,x); END(_HIDDEN(x)) +#define END_WEAK(x) END_STRONG(x); .weak x + + diff --git a/lib/libc/arch/vax/SYS.h b/lib/libc/arch/vax/SYS.h index 2449243f186..cba02a0678a 100644 --- a/lib/libc/arch/vax/SYS.h +++ b/lib/libc/arch/vax/SYS.h @@ -1,4 +1,4 @@ -/* $OpenBSD: SYS.h,v 1.17 2015/04/07 01:27:07 guenther Exp $ */ +/* $OpenBSD: SYS.h,v 1.18 2015/08/31 02:53:57 guenther Exp $ */ /* $NetBSD: SYS.h,v 1.4 1997/05/02 18:15:32 kleink Exp $ */ /* @@ -30,7 +30,7 @@ * SUCH DAMAGE. */ -#include <machine/asm.h> +#include "DEFS.h" #include <sys/syscall.h> #define _CAT(x,y) x##y diff --git a/lib/libc/arch/vax/string/bcmp.S b/lib/libc/arch/vax/string/bcmp.S index ccb63da20f2..c25d46c5102 100644 --- a/lib/libc/arch/vax/string/bcmp.S +++ b/lib/libc/arch/vax/string/bcmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bcmp.S,v 1.5 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: bcmp.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -54,3 +54,4 @@ ENTRY(bcmp, 0) clrl %r0 # we have a match! 9: ret +END_WEAK(bcmp) diff --git a/lib/libc/arch/vax/string/bcopy.S b/lib/libc/arch/vax/string/bcopy.S index 5af2edea373..27d5d8fd24a 100644 --- a/lib/libc/arch/vax/string/bcopy.S +++ b/lib/libc/arch/vax/string/bcopy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bcopy.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: bcopy.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -69,3 +69,4 @@ ENTRY(bcopy, R2|R3|R4|R5|R6) subl2 %r6,%r3 movc3 %r6,(%r1),(%r3) ret +END_WEAK(bcopy) diff --git a/lib/libc/arch/vax/string/bzero.S b/lib/libc/arch/vax/string/bzero.S index 55febbe11b5..0867d3971c3 100644 --- a/lib/libc/arch/vax/string/bzero.S +++ b/lib/libc/arch/vax/string/bzero.S @@ -1,4 +1,4 @@ -/* $OpenBSD: bzero.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: bzero.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -44,3 +44,4 @@ ENTRY(bzero, R2|R3|R4|R5) jgtr 1b movc5 $0,(%r3),$0,8(%ap),(%r3) ret +END_WEAK(bzero) diff --git a/lib/libc/arch/vax/string/ffs.S b/lib/libc/arch/vax/string/ffs.S index e2caa68c607..1e75f128a06 100644 --- a/lib/libc/arch/vax/string/ffs.S +++ b/lib/libc/arch/vax/string/ffs.S @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs.S,v 1.5 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: ffs.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ /* * Copyright (c) 1983, 1993 * The Regents of the University of California. All rights reserved. @@ -39,3 +39,4 @@ ENTRY(ffs, 0) 1: incl %r0 ret +END_WEAK(ffs) diff --git a/lib/libc/arch/vax/string/memcmp.S b/lib/libc/arch/vax/string/memcmp.S index 6a794547d5d..8fdf29435bb 100644 --- a/lib/libc/arch/vax/string/memcmp.S +++ b/lib/libc/arch/vax/string/memcmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memcmp.S,v 1.5 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: memcmp.S,v 1.6 2015/08/31 02:53:57 guenther Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -63,3 +63,4 @@ ENTRY(memcmp, 0) subl3 %r4,%r3,%r0 9: ret +END_STRONG(memcmp) diff --git a/lib/libc/arch/vax/string/memcpy.S b/lib/libc/arch/vax/string/memcpy.S index d456a9a2d4f..e13ae0baa24 100644 --- a/lib/libc/arch/vax/string/memcpy.S +++ b/lib/libc/arch/vax/string/memcpy.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memcpy.S,v 1.8 2015/05/26 20:23:39 miod Exp $ */ +/* $OpenBSD: memcpy.S,v 1.9 2015/08/31 02:53:57 guenther Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -56,3 +56,4 @@ ENTRY(memcpy, R2|R3|R4|R5) movl 12(%ap),%r2 decw %r0 /* from 0 to 65535 */ brb 1b /* retry */ +END_STRONG(memcpy) diff --git a/lib/libc/arch/vax/string/memmove.S b/lib/libc/arch/vax/string/memmove.S index 86513fdbba9..3f71d2629c1 100644 --- a/lib/libc/arch/vax/string/memmove.S +++ b/lib/libc/arch/vax/string/memmove.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memmove.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: memmove.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -84,3 +84,4 @@ ENTRY(memmove, R2|R3|R4|R5) subl2 %r0,%r1 subl2 %r0,%r3 brb 5b +END_STRONG(memmove) diff --git a/lib/libc/arch/vax/string/memset.S b/lib/libc/arch/vax/string/memset.S index b861477884f..40bada34ea7 100644 --- a/lib/libc/arch/vax/string/memset.S +++ b/lib/libc/arch/vax/string/memset.S @@ -1,4 +1,4 @@ -/* $OpenBSD: memset.S,v 1.6 2013/07/05 21:10:50 miod Exp $ */ +/* $OpenBSD: memset.S,v 1.7 2015/08/31 02:53:57 guenther Exp $ */ /*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. @@ -46,3 +46,4 @@ ENTRY(memset, R2|R3|R4|R5) subl2 %r0,12(%ap) movc5 $0,(%r3),%r1,%r0,(%r3) jbr 1b +END_STRONG(memset) diff --git a/lib/libc/arch/vax/string/strchr.S b/lib/libc/arch/vax/string/strchr.S index 9d1b75423e7..7c8b8de57dd 100644 --- a/lib/libc/arch/vax/string/strchr.S +++ b/lib/libc/arch/vax/string/strchr.S @@ -1,4 +1,4 @@ -/* $OpenBSD: strchr.S,v 1.2 2015/05/15 22:29:37 millert Exp $ */ +/* $OpenBSD: strchr.S,v 1.3 2015/08/31 02:53:57 guenther Exp $ */ /* * Copyright (c) 1980, 1993 * The Regents of the University of California. All rights reserved. @@ -56,3 +56,4 @@ ENTRY(strchr, 0) jneq 3b decl %r0 jbr 2b +END_STRONG(strchr) |