diff options
author | 2000-02-22 13:46:54 +0000 | |
---|---|---|
committer | 2000-02-22 13:46:54 +0000 | |
commit | b221bf7548402ec4e00a1501b2a9aebf5c8b1a98 (patch) | |
tree | d8d6a90025afc2a98e8712453477015c22567ef8 /sys/lib/libkern/mcount.c | |
parent | cleanup some code and build stuff (diff) | |
download | wireguard-openbsd-b221bf7548402ec4e00a1501b2a9aebf5c8b1a98.tar.xz wireguard-openbsd-b221bf7548402ec4e00a1501b2a9aebf5c8b1a98.zip |
Add an __attribute__((unused))__ to the function declared by _MCOUNT_DECL,
sparc defines that function as static and gcc doesn't understand that it gets
called from an assembler stub.
Diffstat (limited to 'sys/lib/libkern/mcount.c')
-rw-r--r-- | sys/lib/libkern/mcount.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/lib/libkern/mcount.c b/sys/lib/libkern/mcount.c index 999cb54db1b..d7f15abb8eb 100644 --- a/sys/lib/libkern/mcount.c +++ b/sys/lib/libkern/mcount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcount.c,v 1.4 1997/11/07 15:56:45 niklas Exp $ */ +/* $OpenBSD: mcount.c,v 1.5 2000/02/22 13:46:54 art Exp $ */ /* $NetBSD: mcount.c,v 1.3.6.1 1996/06/12 04:23:01 cgd Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93"; #else -static char rcsid[] = "$OpenBSD: mcount.c,v 1.4 1997/11/07 15:56:45 niklas Exp $"; +static char rcsid[] = "$OpenBSD: mcount.c,v 1.5 2000/02/22 13:46:54 art Exp $"; #endif #endif @@ -59,8 +59,12 @@ static char rcsid[] = "$OpenBSD: mcount.c,v 1.4 1997/11/07 15:56:45 niklas Exp $ * 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); +_MCOUNT_DECL(u_long frompc, u_long selfpc) __attribute__((unused)); _MCOUNT_DECL(frompc, selfpc) /* _mcount; may be static, inline, etc */ register u_long frompc, selfpc; { |