From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17230 invoked by alias); 17 Apr 2012 18:20:20 -0000 Received: (qmail 17216 invoked by uid 22791); 17 Apr 2012 18:20:18 -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; Tue, 17 Apr 2012 18:19:31 +0000 From: "hjl.tools at gmail 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: Tue, 17 Apr 2012 18:20: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: hjl.tools at gmail 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/msg01426.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46770 --- Comment #80 from H.J. Lu 2012-04-17 18:12:41 UTC --- (In reply to comment #79) > > As Paul noted, this is a moot point in practice for .ctors, since GCC emits > only a single .ctors entry per TU, but it could be significant for assembly > code or for TUs with .init_array sections. > That is my concern. .init_array section in the same TU can may have more than one entry due to: 1. Assembly code. 2. constructor attribute in C source. 3. .init_array section attribute in C source. We need to spell out exactly what --reverse-init-array should do.