From patchwork Wed Apr 19 09:21:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 752144 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7Ghx2Dckz9s3w for ; Wed, 19 Apr 2017 19:21:36 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="k9P4Pbv5"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=VyTRntghXae355cUa 2Wl81FLNwyz3MCK3zfYFT+TYDcsmuGEFkbf1CjJwOWhFbN0VKtuVjnbgbBoDCO4k YRAwX+50C1uBoKuZrROG9B/DGfNOyulvWeaiAYWGLHZK+EP806WVOgpSpA8+0zat qwGQgP209/KBr8wm7uP6neCLCg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=ZCgFWtsNsrSynBsxGFGdr8a 5eLY=; b=k9P4Pbv5ywk1Pwav0os+8WHU9iaKT4E32BLhFuJHBrCWmYR960DdQkz +R2vBMDOl6IsCLhF2gQXEkRoqTtnn+70H3no7cVALCSdCzDJXuCxlaobBZJ3bY6C fOkErLgUQaLcM5sOWKz8TxVjPJ0mKoq8QGXDJawHx2qRmLOUOjlw= Received: (qmail 34020 invoked by alias); 19 Apr 2017 09:21:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 33951 invoked by uid 89); 19 Apr 2017 09:21:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=HX-Envelope-From:sk:thomas., Best X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Apr 2017 09:21:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 01437B16; Wed, 19 Apr 2017 02:21:24 -0700 (PDT) Received: from [10.2.206.52] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3DEE13F41F; Wed, 19 Apr 2017 02:21:23 -0700 (PDT) Subject: Re: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" References: <709f0814-5879-d291-4828-1ba664be3efd@foss.arm.com> From: Thomas Preudhomme Message-ID: <59409543-3f31-2c7b-394d-3fb9073acd5d@foss.arm.com> Date: Wed, 19 Apr 2017 10:21:21 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <709f0814-5879-d291-4828-1ba664be3efd@foss.arm.com> X-IsSubscribed: yes Stage 4 ping? Best regards, Thomas On 11/04/17 18:35, Thomas Preudhomme wrote: > Hi, > > Several tests started failing for ARM targets (eg. gcc.dg/initpri1.c) > after change 6f9dbcd42f2cf034a9a21f46842c08d2e88449db in binutils. This > is because the non-default priority init_array and fini_array sections > are not created with NOTYPE flag as is the case for default priority > init_array and fini_array sections (see default_section_type_flags in > varasm.c for instance). This patch fixes the issue. > > ChangeLog entry is as follows: > > *** gcc/ChangeLog *** > > 2017-04-11 Thomas Preud'homme > > * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default > priority .init_array and .fini_array section with SECTION_NOTYPE > flag. > > Testing: with this patch test gcc.dg/initpri1.c succeeds but fails > without. > > Is this ok for stage4? > > Best regards, > > Thomas diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index a2d80cfd645928fb8b3178a8e0c7173adce5d598..f3a6b64b16896e82d6e7a66726a929f0572542d9 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -22593,7 +22593,7 @@ arm_elf_asm_cdtor (rtx symbol, int priority, bool is_ctor) sprintf (buf, "%s.%.5u", is_ctor ? ".init_array" : ".fini_array", priority); - s = get_section (buf, SECTION_WRITE, NULL_TREE); + s = get_section (buf, SECTION_WRITE | SECTION_NOTYPE, NULL_TREE); } else if (is_ctor) s = ctors_section;