Do the used/unused dance under #ifdef KERNEL too. Prevents mcount
from being optimized away when compiling sh3 kernels with profiling enabled (gcc doesn't see that __mcount, which is written in asm, refers to it).
This commit is contained in:
parent
0ba65a4c32
commit
088af57adf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcount.c,v 1.5 2006/01/08 07:46:39 christos Exp $ */
|
||||
/* $NetBSD: mcount.c,v 1.6 2006/10/26 23:10:16 uwe Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003, 2004 Wasabi Systems, Inc.
|
||||
@ -76,7 +76,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)mcount.c 8.1 (Berkeley) 6/4/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: mcount.c,v 1.5 2006/01/08 07:46:39 christos Exp $");
|
||||
__RCSID("$NetBSD: mcount.c,v 1.6 2006/10/26 23:10:16 uwe Exp $");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -95,7 +95,11 @@ struct gmonparam *_m_gmon_alloc(void);
|
||||
|
||||
_MCOUNT_DECL __P((u_long, u_long))
|
||||
#ifdef _KERNEL
|
||||
#ifdef __vax__
|
||||
__attribute__((__unused__,__no_instrument_function__)); /* see below. */
|
||||
#else
|
||||
__attribute__((__used__,__no_instrument_function__)); /* see below. */
|
||||
#endif
|
||||
#else
|
||||
#ifdef __vax__
|
||||
__attribute__((__unused__)); /* see below. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user