This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 11 Dec 2010 19:46:58 +0000
- Subject: [Bug target/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them
- Auto-submitted: auto-generated
- References: <bug-46770-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770
--- Comment #20 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-11 19:46:46 UTC ---
(In reply to comment #12)
> OK, do you know why the order of execution of .ctor was chosen to be reversed
> even if it would make more sense to reverse .dtors?
>
Now I remembered. The reverse order of execution of .ctor is
to support constructor priorities. We can't change it without
breaking existing objects.