Get rid of the no longer needed DECL_GLOBAL_CONSTRUCTOR macro.
This commit is contained in:
parent
ebe727e56d
commit
cfe45cc130
|
@ -210,32 +210,6 @@ struct statvfs
|
||||||
#endif /* __GNUC__ */
|
#endif /* __GNUC__ */
|
||||||
|
|
||||||
|
|
||||||
/* Constructor functions */
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
|
||||||
static void func(void) __attribute__((constructor)); \
|
|
||||||
static void func(void)
|
|
||||||
#elif defined(__i386__)
|
|
||||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
|
||||||
static void __dummy_init_##func(void) { \
|
|
||||||
asm(".section .init,\"ax\"\n\t" \
|
|
||||||
"call " #func "\n\t" \
|
|
||||||
".previous"); } \
|
|
||||||
static void func(void)
|
|
||||||
#elif defined(__sparc__)
|
|
||||||
# define DECL_GLOBAL_CONSTRUCTOR(func) \
|
|
||||||
static void __dummy_init_##func(void) { \
|
|
||||||
asm("\t.section \".init\",#alloc,#execinstr\n" \
|
|
||||||
"\tcall " #func "\n" \
|
|
||||||
"\tnop\n" \
|
|
||||||
"\t.section \".text\",#alloc,#execinstr\n" ); } \
|
|
||||||
static void func(void)
|
|
||||||
#else
|
|
||||||
# error You must define the DECL_GLOBAL_CONSTRUCTOR macro for your platform
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* Register functions */
|
/* Register functions */
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
|
|
|
@ -974,7 +974,14 @@ void __pthread_initialize(void)
|
||||||
if (libc_pthread_init) libc_multiple_threads = libc_pthread_init( &libc_pthread_functions );
|
if (libc_pthread_init) libc_multiple_threads = libc_pthread_init( &libc_pthread_functions );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DECL_GLOBAL_CONSTRUCTOR(init) { __pthread_initialize(); }
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
static void init(void) __attribute__((constructor));
|
||||||
|
static void init(void)
|
||||||
|
{
|
||||||
|
__pthread_initialize();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static struct pthread_functions libc_pthread_functions =
|
static struct pthread_functions libc_pthread_functions =
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue