summaryrefslogtreecommitdiffstats
path: root/sys/sys/linker_set.h
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-07-28 07:07:16 +0000
committerkan <kan@FreeBSD.org>2004-07-28 07:07:16 +0000
commit4427f9af512d1ab7f2775f2e6dbdc0641729f494 (patch)
tree05a86181363b8a24a8fd552df6e9e5c0dc2584b0 /sys/sys/linker_set.h
parent88d0e4fb93bc00fc91f75eddd4bfa37d79a73657 (diff)
downloadFreeBSD-src-4427f9af512d1ab7f2775f2e6dbdc0641729f494.zip
FreeBSD-src-4427f9af512d1ab7f2775f2e6dbdc0641729f494.tar.gz
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.
Diffstat (limited to 'sys/sys/linker_set.h')
-rw-r--r--sys/sys/linker_set.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
index 5550ed1..d51ad4d 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"
OpenPOWER on IntegriCloud