From patchwork Wed Aug 14 13:37:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Lyon X-Patchwork-Id: 171302 Delivered-To: patch@linaro.org Received: by 2002:ac9:5c4b:0:0:0:0:0 with SMTP id r11csp822247ocp; Wed, 14 Aug 2019 06:38:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2tH+nMwfZPQE4yaTQTZbm8ZOhCm6abWT/Ies1ob3QUz90eNHMrEiXcLShimnaC6OUeenA X-Received: by 2002:a62:7d0d:: with SMTP id y13mr6995272pfc.150.1565789881873; Wed, 14 Aug 2019 06:38:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565789881; cv=none; d=google.com; s=arc-20160816; b=GN8vdKJjVoqHyxw108JDt6mbG8Zqb4iode9eKY4JguU81nuwqC/EJ5+6m88mHKlgzt Iuu/I5A3Wu+7YOX41zbsQfD6Sf5uZ1hJJsavx+DkGVulVplO6xWdwIJwjGVF9rcQVd/e EdEmcmhl7YcdVI4J6YVnlh/tBNkQnIUSOQsgnVSqxWJETr+j12W8GBU0X78acCNZP8L7 LA8L+znC/j2ps1HgfGkHA/EXv+CHEOJEMpF3BPqddhgCGF9r28ccFsxaj7T2cd4TdXY5 G6rWV7Y2renuYHsn2eIQ6TDVBEuoSRE77zU4le6QsR0c5aSAGusYsCt37WgEhtebchzt tJMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:mime-version:dkim-signature :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=VwYhgKMU6eVsxXJmRvMOKwaJiUUTv9hlPVzz/HKc3iI=; b=n0hiODwTkphym6WxyCfeakOCQRqMR5VSZWERPgMiqHAqkr193j99/6K24IdUlBE/co OnOlTAIwCmBNX6v0jEQHwTDQR4C6gwXGsN/obb+SVvbPxhQ81ggF3Z1Eynm7ECZMihCq jh1X117bwtGZ1Ypt/1MFcgzbTKNyl0m+YbNCZS1CCNdZ1pIgswRQ3jvWcon6tQftsMIU 4mGtYysxROomfRCGA+E8WNfNMY3jPRAiPyco7EOYsBnHUgrPc5Ur+Cg9iawRtzrwxG9a 0pLMKY7FHnedySMAGZXzDJFJmCT5nJxAZz07vKVvX9WrlZgpCEEQOo8S4vbzHpmowOVG HWZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PC4xcxjP; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S59nFche; spf=pass (google.com: domain of binutils-return-106640-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="binutils-return-106640-patch=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id a123si71737886pfd.114.2019.08.14.06.38.01 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Aug 2019 06:38:01 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-106640-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PC4xcxjP; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S59nFche; spf=pass (google.com: domain of binutils-return-106640-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="binutils-return-106640-patch=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; q=dns; s=default; b=y71YygFL1A3rxR2tZCZqD/BdNXne0 r39kn36YNMdac0UcGhcTQ7iTB6twOteSFPdc/tZCB9rEhRJYI5L116egau4oh5n4 Fv0K8FSF9IHcQIufBSH5AgT8Y+iFKMn23yk6PKjgHfYeLM0wGDRV3+PVWpj4NmAj JbVungDWElpMcQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:from:date:message-id:subject:to :content-type; s=default; bh=pUjUxoF9M3IwXbH5IiDmF7eA+Uc=; b=PC4 xcxjPZbvGX0C9kMysrdZos38eBkTUe5TdRrd6FaypSQxlu7E/iwhrBS2VWy5klwk g3omzelxZC4JF8MpJCJKueRTtfShVIq8IInRYwGNoqL2thzqvueASQ0dH+qfiHcP zlUj5fZaKLX7U1q40/XaRTUrh1fvfsm/ol+zjxzE= Received: (qmail 74853 invoked by alias); 14 Aug 2019 13:37:49 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 74843 invoked by uid 89); 14 Aug 2019 13:37:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-lj1-f173.google.com Received: from mail-lj1-f173.google.com (HELO mail-lj1-f173.google.com) (209.85.208.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Aug 2019 13:37:39 +0000 Received: by mail-lj1-f173.google.com with SMTP id e27so9676730ljb.7 for ; Wed, 14 Aug 2019 06:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to; bh=diYw7HTZ800Cn5ftxshGmD8Y3pYWV2R0t6v0toZ6Chw=; b=S59nFcheyUIPIL221VQZuQ5gILDYMu3ShriSXUGUVbpbfBW7E9OHrLlVAPxwtVjiZh iXRV1iYhWmRsAzphEcoDRKjFCZ6DCr7nkcKj5mwXYy7ekquYRwj/GnzDSTHMSiEGO0hd mWmfb/eWNv3YnzAMG4kUomLc4zbUxbmT9f+FZen6m7gFXusEs6w5NcEFvfXxKUKqL8cN 5SZ/5Bt7HyNp5XpI0tuUMElXrxrAgy4+b2HsQv10n8+QPgaxQoeuHdUUchoXjQ0ObkkE NrxTXbo3otdyv4IRRKgkjqTRHKmqs/b6Nsh+RfXeNffMGydfFc0ZBnxGGMmht2nSBfGG afcQ== MIME-Version: 1.0 From: Christophe Lyon Date: Wed, 14 Aug 2019 15:37:25 +0200 Message-ID: Subject: [Patch] [ld] [arm] Add support for noinit section To: binutils X-IsSubscribed: yes Hi, Similar to what already exists for TI msp430 or in TI compilers for arm, this patch adds support for the "noinit" attribute. I've just committed the GCC patch: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00381.html https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=274482 This small linker patch makes sure that the noinit section has the NOLOAD flag. OK? Christophe 2019-08-14 Christophe Lyon * emulparams/armelf.sh (OTHER_SECTIONS): Add support for noinit section. diff --git a/ld/emulparams/armelf.sh b/ld/emulparams/armelf.sh index 272a8bc..d46e0bd 100644 --- a/ld/emulparams/armelf.sh +++ b/ld/emulparams/armelf.sh @@ -10,7 +10,19 @@ OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7) *(.vfp11_veneer) *(.v4_bx)' OTHER_BSS_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__bss_start__ = .${CREATE_SHLIB+)};" OTHER_BSS_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}_bss_end__ = .${CREATE_SHLIB+)}; ${CREATE_SHLIB+PROVIDE (}__bss_end__ = .${CREATE_SHLIB+)};" OTHER_END_SYMBOLS="${CREATE_SHLIB+PROVIDE (}__end__ = .${CREATE_SHLIB+)};" -OTHER_SECTIONS='.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) }' +OTHER_SECTIONS=' +.note.gnu.arm.ident 0 : { KEEP (*(.note.gnu.arm.ident)) } +/* This section contains data that is not initialised during load + *or* application reset. */ + .noinit (NOLOAD) : + { + . = ALIGN(2); + PROVIDE (__noinit_start = .); + *(.noinit) + . = ALIGN(2); + PROVIDE (__noinit_end = .); + } +' ATTRS_SECTIONS='.ARM.attributes 0 : { KEEP (*(.ARM.attributes)) KEEP (*(.gnu.attributes)) }' OTHER_READONLY_SECTIONS=" .ARM.extab ${RELOCATING-0} : { *(.ARM.extab${RELOCATING+* .gnu.linkonce.armextab.*}) }