From 3921361c6a79af48bdaed6cf7c182b48469f3476 Mon Sep 17 00:00:00 2001 From: lukem Date: Tue, 2 Dec 2003 03:01:19 +0000 Subject: [PATCH] Use __attribute__((__used__,__noinline__)) (instead of __unused__) for __do_global_ctors_aux() and __do_global_dtors_aux(), to fix building with gcc3 -O3. Discussed with Matt Thomas & Christos Zoulas, and tested on alpha & i386. --- lib/csu/common_elf/crtbegin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/csu/common_elf/crtbegin.c b/lib/csu/common_elf/crtbegin.c index ac66a7e3fa2d..0bc1f85eff4c 100644 --- a/lib/csu/common_elf/crtbegin.c +++ b/lib/csu/common_elf/crtbegin.c @@ -1,4 +1,4 @@ -/* $NetBSD: crtbegin.c,v 1.22 2003/09/07 22:27:54 fvdl Exp $ */ +/* $NetBSD: crtbegin.c,v 1.23 2003/12/02 03:01:19 lukem Exp $ */ /*- * Copyright (c) 1998, 2001, 2002 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ __dtors(void) (**p++)(); } -static void __attribute__((__unused__)) +static void __attribute__((__used__,__noinline__)) __do_global_ctors_aux(void) { static int initialized; @@ -166,7 +166,7 @@ __do_global_ctors_aux(void) } MD_CALL_STATIC_FUNCTION(.init, __do_global_ctors_aux) -static void __attribute__((__unused__)) +static void __attribute__((__used__,__noinline__)) __do_global_dtors_aux(void) { static int finished;