From patchwork Tue Apr 11 17:35:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Preudhomme X-Patchwork-Id: 749577 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 3w2Z2Q11Tfz9sNb for ; Wed, 12 Apr 2017 03:35:25 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="LDMcGh4k"; 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:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=dROrAY9wIpiJIB6FHrNogpEYwxrV2p0ShYtTJFCllewkIXo4ry TW44sMntOyHs5kFTbhTcwS4K8Z954Mx2tETCD4ddEYEjJuTkVVV0p7tIpzM7jjrG djRZIPUFuxRMd9e6DNo4BsC/DxrX5qbt7s3wG2p+otXyTPIjgio7hidHk= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=Lxp4hnyzYPs1D1vEc39IYswJLpM=; b=LDMcGh4k+EUWQX3DveZ7 netAg7HaCEy0EKSwH8qttHkVrGgrJDZLcix8jkJRTD576VK8I32IDCzf0p0846Vk WI3ioFRqo08Gf38FCXedpbXx3nyvaMGJz0TTmHqNKBga55qaHkUuJh4akqQR8VSr SjzH66A8KIPXAS5b7qZPhIE= Received: (qmail 1749 invoked by alias); 11 Apr 2017 17:35:12 -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 1321 invoked by uid 89); 11 Apr 2017 17:35:11 -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= 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; Tue, 11 Apr 2017 17:35:10 +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 362A580D; Tue, 11 Apr 2017 10:35:10 -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 750C63F575; Tue, 11 Apr 2017 10:35:09 -0700 (PDT) To: Kyrill Tkachov , Ramana Radhakrishnan , Richard Earnshaw , "gcc-patches@gcc.gnu.org" From: Thomas Preudhomme Subject: [PATCH, GCC, stage4] Fix type for .init_array.* and .fini_array.* sections Message-ID: <709f0814-5879-d291-4828-1ba664be3efd@foss.arm.com> Date: Tue, 11 Apr 2017 18:35:08 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 X-IsSubscribed: yes 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;