http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
--- Comment #25 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-11 20:04:23 UTC --- (In reply to comment #24) > > I have said "If you have constructor priorities in .o files and .c > > files, you may get different behaviors if .o files are compiled with > > a different compiler, different versions of GCC or not GCC at all." > > Well, it sounds to me, then, that we would be introducing a binary > compatibility problem to make this change. If we're going to do it, I Shared libraries are OK. Only static ones may have this issue. > think that means adding linker smarts that detect that there are both > .ctor.* and .init_array.* sections and issuing an error -- not a warning I will work on a linker patch. > -- together with a hint as to how to recompile so as to get either the > new or old behavior. (Some people will have binary libraries they can't > recompile, so we need to explain how to compile new code so that it > still uses .ctor.*.) We need a gcc option to select .ctor or .init_array.