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.
This commit is contained in:
Alexander Kabaev 2004-07-28 07:07:16 +00:00
parent 36efbf4ff7
commit e89fadd930

View File

@ -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"