------- Comment #11 from danglin at gcc dot gnu dot org 2009-02-17 01:37
-------
It is a limitation of the Apple assembler and linker. From the Apple assembler
manual:
.mod_init_func
This is equivalent to .section __DATA, __mod_init_func, mod_init_funcs
This section is of type mod_init_funcs and has no attributes. The C++ compiler
places a pointer to a
function in this section for each function it creates to call the constructors
(if the module has them).
.mod_term_func
This is equivalent to .section __DATA, __mod_term_func, mod_term_funcs
This section is of type mod_term_funcs and has no attributes. The C++ compiler
places a pointer to a
function in this section for each function it creates to call the destructors
(if the module has them).
These directives don't allow for a priority.
It might be possible to sort constructors/destructors with collect2, but for
now it as if something like the following
/* The Apple linker does not support constructor priorities. */
#undef SUPPORTS_INIT_PRIORITY
#define SUPPORTS_INIT_PRIORITY 0
should be added to darwin.h.
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34587