Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/common/lib/libc/arch Use strong alias within the kernel name...



details:   https://anonhg.NetBSD.org/src/rev/92c572ce5a9a
branches:  trunk
changeset: 749308:92c572ce5a9a
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Nov 26 07:40:34 2009 +0000

description:
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:

 common/lib/libc/arch/i386/atomic/atomic.S   |  10 +++++++---
 common/lib/libc/arch/x86_64/atomic/atomic.S |  10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

diffs (58 lines):

diff -r 8a0088edccda -r 92c572ce5a9a common/lib/libc/arch/i386/atomic/atomic.S
--- a/common/lib/libc/arch/i386/atomic/atomic.S Thu Nov 26 07:35:39 2009 +0000
+++ b/common/lib/libc/arch/i386/atomic/atomic.S Thu Nov 26 07:40:34 2009 +0000
@@ -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 -r 8a0088edccda -r 92c572ce5a9a common/lib/libc/arch/x86_64/atomic/atomic.S
--- a/common/lib/libc/arch/x86_64/atomic/atomic.S       Thu Nov 26 07:35:39 2009 +0000
+++ b/common/lib/libc/arch/x86_64/atomic/atomic.S       Thu Nov 26 07:40:34 2009 +0000
@@ -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
 



Home | Main Index | Thread Index | Old Index