summaryrefslogtreecommitdiff
path: root/common/lib/libc
diff options
context:
space:
mode:
authorpooka <pooka@NetBSD.org>2009-11-26 07:40:34 +0000
committerpooka <pooka@NetBSD.org>2009-11-26 07:40:34 +0000
commit043ef3bc7165c1a3cff87bb2e9ef756a3df115e7 (patch)
tree4bcfd6390c0698d6566ac92dd092f67bd895f5fd /common/lib/libc
parent3c809c1925424429ef671b123d303f8823967129 (diff)
Use strong alias within the kernel namespace regardless of if we're
dealing with a hard or soft kernel (kernel linker doesn't support weak symbols).
Diffstat (limited to 'common/lib/libc')
-rw-r--r--common/lib/libc/arch/i386/atomic/atomic.S10
-rw-r--r--common/lib/libc/arch/x86_64/atomic/atomic.S10
2 files changed, 14 insertions, 6 deletions
diff --git a/common/lib/libc/arch/i386/atomic/atomic.S b/common/lib/libc/arch/i386/atomic/atomic.S
index 86c369d4c3b..bb8cf4d3e9a 100644
--- a/common/lib/libc/arch/i386/atomic/atomic.S
+++ b/common/lib/libc/arch/i386/atomic/atomic.S
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.S,v 1.17 2009/04/02 00:19:02 enami Exp $ */
+/* $NetBSD: atomic.S,v 1.18 2009/11/26 07:40:34 pooka Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -32,13 +32,17 @@
#include <sys/param.h>
#include <machine/asm.h>
+#ifdef _KERNEL
+#define ALIAS(f, t) STRONG_ALIAS(f,t)
+#else
+#define ALIAS(f, t) WEAK_ALIAS(f,t)
+#endif
+
#ifdef _HARDKERNEL
#define LOCK(n) .Lpatch/**/n: lock
-#define ALIAS(f, t) STRONG_ALIAS(f,t)
#define ENDLABEL(a) _ALIGN_TEXT; LABEL(a)
#else
#define LOCK(n) lock
-#define ALIAS(f, t) WEAK_ALIAS(f,t)
#define ENDLABEL(a) /* nothing */
#endif
diff --git a/common/lib/libc/arch/x86_64/atomic/atomic.S b/common/lib/libc/arch/x86_64/atomic/atomic.S
index 3b17fea9118..81bd568a412 100644
--- a/common/lib/libc/arch/x86_64/atomic/atomic.S
+++ b/common/lib/libc/arch/x86_64/atomic/atomic.S
@@ -1,4 +1,4 @@
-/* $NetBSD: atomic.S,v 1.14 2009/01/12 02:53:29 pooka Exp $ */
+/* $NetBSD: atomic.S,v 1.15 2009/11/26 07:40:34 pooka Exp $ */
/*-
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -32,13 +32,17 @@
#include <sys/param.h>
#include <machine/asm.h>
+#ifdef _KERNEL
+#define ALIAS(f, t) STRONG_ALIAS(f,t)
+#else
+#define ALIAS(f, t) WEAK_ALIAS(f,t)
+#endif
+
#ifdef _HARDKERNEL
#define LOCK(n) .Lpatch/**/n: lock
-#define ALIAS(f, t) STRONG_ALIAS(f,t)
#define ENDLABEL(a) _ALIGN_TEXT; LABEL(a)
#else
#define LOCK(n) lock
-#define ALIAS(f, t) WEAK_ALIAS(f,t)
#define ENDLABEL(a) /* nothing */
#endif