From f816020cc2cbc721af48d71cbb4ab033aadd5ded Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 9 May 2010 15:56:09 +0000 Subject: Mark _MCOUNT_DECL as __used to prevent gcc4 from optimizing it away when it is only referenced from inline asm. ok jsg@ --- lib/libc/gmon/mcount.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/libc/gmon/mcount.c b/lib/libc/gmon/mcount.c index b977759b00e..d5faba86654 100644 --- a/lib/libc/gmon/mcount.c +++ b/lib/libc/gmon/mcount.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mcount.c,v 1.10 2005/08/08 08:05:34 espie Exp $ */ +/* $OpenBSD: mcount.c,v 1.11 2010/05/09 15:56:08 kettenis Exp $ */ /*- * Copyright (c) 1983, 1992, 1993 * The Regents of the University of California. All rights reserved. @@ -46,7 +46,7 @@ * both frompcindex and frompc. Any reasonable, modern compiler will * perform this optimization. */ -_MCOUNT_DECL(u_long frompc, u_long selfpc); +_MCOUNT_DECL(u_long frompc, u_long selfpc) __used; /* _mcount; may be static, inline, etc */ _MCOUNT_DECL(u_long frompc, u_long selfpc) { -- cgit v1.2.3