From 4427f9af512d1ab7f2775f2e6dbdc0641729f494 Mon Sep 17 00:00:00 2001 From: kan Date: Wed, 28 Jul 2004 07:07:16 +0000 Subject: [PATCH] Emply __used attribute to prevent compiler from removing unreferenced static symbols. This wasn't a problem with previous GCC releases, but unit-at-a-time mode of GCC 3.4.2 prevents linker set components from being emitted at all. --- sys/sys/linker_set.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h index 5550ed1d714e..d51ad4d22831 100644 --- a/sys/sys/linker_set.h +++ b/sys/sys/linker_set.h @@ -42,7 +42,7 @@ #if defined(__GNUC__) || defined(__INTEL_COMPILER) #define __MAKE_SET(set, sym) \ static void const * const __set_##set##_sym_##sym \ - __section("set_" #set) __unused = &sym + __section("set_" #set) __used = &sym #else /* !(__GNUC__ || __INTEL_COMPILER) */ #ifndef lint #error "This file needs to be compiled by GCC, an Intel compiler or lint"