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/m68k/string For kernel, rename ffs to _...
details: https://anonhg.NetBSD.org/src/rev/e6e253cf94ec
branches: trunk
changeset: 970053:e6e253cf94ec
user: rin <rin%NetBSD.org@localhost>
date: Tue Mar 10 08:15:44 2020 +0000
description:
For kernel, rename ffs to __ffssi2 rather than having a weak symbol.
This enables us to load modules depended to __ffssi2.
It is difficult to deal with weak symbols consistently in in-kernel
linker. See explanation by pgoyette on tech-kern:
http://mail-index.netbsd.org/tech-kern/2020/03/09/msg026148.html
Also, we do not currently provide ffs(9) as a kernel routine.
diffstat:
common/lib/libc/arch/m68k/string/ffs.S | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r bfcaea99f1fb -r e6e253cf94ec common/lib/libc/arch/m68k/string/ffs.S
--- a/common/lib/libc/arch/m68k/string/ffs.S Tue Mar 10 04:04:45 2020 +0000
+++ b/common/lib/libc/arch/m68k/string/ffs.S Tue Mar 10 08:15:44 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs.S,v 1.7 2020/03/09 13:36:10 rin Exp $ */
+/* $NetBSD: ffs.S,v 1.8 2020/03/10 08:15:44 rin Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -39,13 +39,22 @@
#if 0
RCSID("from: @(#)ffs.s 5.1 (Berkeley) 5/12/90")
#else
- RCSID("$NetBSD: ffs.S,v 1.7 2020/03/09 13:36:10 rin Exp $")
+ RCSID("$NetBSD: ffs.S,v 1.8 2020/03/10 08:15:44 rin Exp $")
#endif
#endif /* LIBC_SCCS and not lint */
/* bit = ffs(value) */
+#ifdef _LIBC
WEAK_ALIAS(__ffssi2,ffs)
+#else /* KERNEL */
+/*
+ * Our in-kernel linker does not understand weak references, which
+ * prevents modules depended on __ffssi2 from being loaded. Also,
+ * we do not provide ffs(9) as a kernel routine. Let's rename it!
+ */
+#define ffs __ffssi2
+#endif
#if (!defined(__mc68010__) && !defined(__mcoldfire__)) || defined(__mcfisac__)
Home |
Main Index |
Thread Index |
Old Index