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:
parent
88d0e4fb93
commit
4427f9af51
@ -42,7 +42,7 @@
|
|||||||
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
|
||||||
#define __MAKE_SET(set, sym) \
|
#define __MAKE_SET(set, sym) \
|
||||||
static void const * const __set_##set##_sym_##sym \
|
static void const * const __set_##set##_sym_##sym \
|
||||||
__section("set_" #set) __unused = &sym
|
__section("set_" #set) __used = &sym
|
||||||
#else /* !(__GNUC__ || __INTEL_COMPILER) */
|
#else /* !(__GNUC__ || __INTEL_COMPILER) */
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
#error "This file needs to be compiled by GCC, an Intel compiler or lint"
|
#error "This file needs to be compiled by GCC, an Intel compiler or lint"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user