summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-01-16 23:38:15 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-01-16 23:38:15 +0000
commit67cecb36d7ec9fd60d5e34830b68c6b012ea2a60 (patch)
tree14baca320a44d01ca573c4dbdda616eb0b15e921
parentdac98cd46c64e2dd9798162865b028e9381745d2 (diff)
replace __attribute__((unused)) with __used, which will be defined to the
right thing for whichever compiler we use. found while trying to build a profiled kernel on sparc64. solution found by guenther and refined by miod and kettenis. ok guenther@ kettenis@
-rw-r--r--sys/lib/libkern/mcount.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/lib/libkern/mcount.c b/sys/lib/libkern/mcount.c
index 5f27f217814..b6421c3cc3d 100644
--- a/sys/lib/libkern/mcount.c
+++ b/sys/lib/libkern/mcount.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mcount.c,v 1.9 2009/10/27 23:59:35 deraadt Exp $ */
+/* $OpenBSD: mcount.c,v 1.10 2013/01/16 23:38:14 dlg Exp $ */
/* $NetBSD: mcount.c,v 1.3.6.1 1996/06/12 04:23:01 cgd Exp $ */
/*-
@@ -47,12 +47,8 @@
* Note: the original BSD code used the same variable (frompcindex) for
* both frompcindex and frompc. Any reasonable, modern compiler will
* perform this optimization.
- *
- * XXX - the unused attribute is there because some archs define _mcount
- * as static and gcc doesn't check for function calls in assembler
- * stubs.
*/
-_MCOUNT_DECL(u_long frompc, u_long selfpc) __attribute__((unused));
+_MCOUNT_DECL(u_long frompc, u_long selfpc) __used;
_MCOUNT_DECL(u_long frompc, u_long selfpc) /* _mcount; may be static, inline, etc */
{
u_short *frompcindex;