From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5736 invoked by alias); 18 Apr 2012 03:53:21 -0000 Received: (qmail 5726 invoked by uid 22791); 18 Apr 2012 03:53:20 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Apr 2012 03:52:34 +0000 From: "ian at airs dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/46770] Replace .ctors/.dtors with .init_array/.fini_array on targets supporting them Date: Wed, 18 Apr 2012 03:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ian at airs dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: hjl.tools at gmail dot com X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg01461.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770 --- Comment #92 from Ian Lance Taylor 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.