From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3911 invoked by alias); 22 Aug 2011 18:57:00 -0000 Received: (qmail 3902 invoked by uid 22791); 22 Aug 2011 18:57:00 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Aug 2011 18:56:44 +0000 Received: by qwh5 with SMTP id 5so3379083qwh.20 for ; Mon, 22 Aug 2011 11:56:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.189.149 with SMTP id de21mr1667451qcb.72.1314039403254; Mon, 22 Aug 2011 11:56:43 -0700 (PDT) Received: by 10.229.29.7 with HTTP; Mon, 22 Aug 2011 11:56:43 -0700 (PDT) In-Reply-To: References: <20110822053744.GM2687@tyan-ft48-01.lab.bos.redhat.com> Date: Mon, 22 Aug 2011 19:19:00 -0000 Message-ID: Subject: Re: PING: PATCH: PR target/46770: Use .init_array/.fini_array sections From: "H.J. Lu" To: "Joseph S. Myers" Cc: Jakub Jelinek , David Edelsohn , GCC Patches Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-08/txt/msg01818.txt.bz2 On Mon, Aug 22, 2011 at 11:53 AM, Joseph S. Myers wrote: > On Mon, 22 Aug 2011, H.J. Lu wrote: > >> On Sun, Aug 21, 2011 at 10:37 PM, Jakub Jelinek wrote: >> nd/or add another test to it that tests >> > that you can actually use >> > .section .init_array >> > and it will use correct section flags for the section. >> > >> >> We need this information in config.gcc. But config.gcc is used >> before assembler and readelf are detected. I am running out of >> ideas. =A0Any suggestions? > > Require a good assembler on ELF targets and just enable this by default > for them without trying a configure test that won't work for cross > compilation (AC_RUN_IFELSE is bad). > > The toplevel config/elf.m4 provides a good notion of what is or is not > ELF (if there are problems, we can fix that file). =A0Only a handful of > targets support non-GNU assemblers; for the vast bulk of targets we should > assume a not-too-old GNU assembler. =A0That way, the configure test can be > used to cause a configure-time error if the assembler is defective and it > doesn't matter that the test is late. > A working .init_array support needs assembler, linker and libc. That is why AC_RUN_IFELSE is used. --=20 H.J.