[Bug other/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them

ian at airs dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 18 03:53:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770

--- Comment #92 from Ian Lance Taylor <ian at airs dot com> 2012-04-18 03:50:51 UTC ---
As I said in comment #47 and elsewhere, you should not confuse the order in
which entries appear in .ctors or .init_array sections with the order in which
they appear in the binary.  If you want better layout in the binary, then tell
the linker to change the layout in the binary.  The order in the .ctors or
.init_array sections is irrelevant.  The fact that reversing the order of
constructors happens to give you faster startup for firefox is just a
coincidence.  Don't let that coincidence drive you toward choices that make no
sense.



More information about the Gcc-bugs mailing list