Workaround for bug in GCC on powerpc64. Symbols that are exported are
by fault required to be all "static" or all "extern".
This commit is contained in:
parent
a5a02eb8c0
commit
41471d69fb
@ -40,6 +40,16 @@
|
||||
* For ELF, this is done by constructing a separate segment for each set.
|
||||
*/
|
||||
|
||||
#if defined(__powerpc64__)
|
||||
/*
|
||||
* Move the symbol pointer from ".text" to ".data" segment, to make
|
||||
* the GCC compiler happy:
|
||||
*/
|
||||
#define __MAKE_SET_CONST
|
||||
#else
|
||||
#define __MAKE_SET_CONST const
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Private macros, not to be used outside this header file.
|
||||
*/
|
||||
@ -47,8 +57,9 @@
|
||||
#define __MAKE_SET(set, sym) \
|
||||
__GLOBL(__CONCAT(__start_set_,set)); \
|
||||
__GLOBL(__CONCAT(__stop_set_,set)); \
|
||||
static void const * const __set_##set##_sym_##sym \
|
||||
__section("set_" #set) __used = &sym
|
||||
static void const * __MAKE_SET_CONST \
|
||||
__set_##set##_sym_##sym __section("set_" #set) \
|
||||
__used = &(sym)
|
||||
#else /* !__GNUCLIKE___SECTION */
|
||||
#ifndef lint
|
||||
#error this file needs to be ported to your compiler
|
||||
|
Loading…
x
Reference in New Issue
Block a user