From patchwork Thu Feb 4 15:50:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 61206 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp536767lbl; Thu, 4 Feb 2016 07:53:57 -0800 (PST) X-Received: by 10.98.33.131 with SMTP id o3mr12026902pfj.97.1454601237239; Thu, 04 Feb 2016 07:53:57 -0800 (PST) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id cf7si17424596pad.136.2016.02.04.07.53.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2016 07:53:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRMDD-0005mU-Lm; Thu, 04 Feb 2016 15:52:51 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aRMCn-0005IV-Hj for linux-arm-kernel@bombadil.infradead.org; Thu, 04 Feb 2016 15:52:25 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by casper.infradead.org with esmtps (Exim 4.85 #2 (Red Hat Linux)) id 1aRMBS-0008Es-1C for linux-arm-kernel@lists.infradead.org; Thu, 04 Feb 2016 15:51:02 +0000 Received: by mail-wm0-x22d.google.com with SMTP id r129so218205703wmr.0 for ; Thu, 04 Feb 2016 07:50:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1ky0n2vkl3uZLxCgnL7bRjbayvq/jY9LLe1WTHv5NUI=; b=Db0qNJzASlX/1GuhVkh7bWg7Q3Mjoq2iiFs1bIXU2/br8MKUjdblihBlyhFvr8/604 mLVJynBGdXKz4RB+WOlEbZjm2m4WH4oXx9TYGHp84gYD6pgujuAAeRcNP75cORg7On0+ cDEbdz38QJkPpHkjLWvQ70/USr9OkjBVbyRkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1ky0n2vkl3uZLxCgnL7bRjbayvq/jY9LLe1WTHv5NUI=; b=PYm40NBpCI/kNEHOaNl0v3mHd2jWAmSlZsqze6eqV4ByUJcoSA0hliGXafy+SDFZiq M8qfTHtP4achPLhY8vVNLc3Oo0NNHf2HESVtJYqnFm2Q6xXo91ce9T7w6pHyrGfNp31+ J0ZW+Z/5TMijRUXyFOraGuHRENSd8N5LZ2dvwx+TcbvoMZDZEVJ4Uyry7yB+jrjXkbgi v7LG8MiccpG46QcSxTgQUZp8YbZuoesPAGRMcSVRbgSF9UGPLQ/+Z9UZtORrSS7yc1l5 5daINE/zSdm9EGtkbvOij0Wlqs1QwKa10Iwbq72ZPlV2gCBqV9eMNcW2jAfvSvVnzxIs wskQ== X-Gm-Message-State: AG10YOSNWWv/kGbCW1k/oBfgekY0OuxHPmLfXZbTj23bDElOdKw0KygeP60Hbfj/V4jDR04t X-Received: by 10.194.95.70 with SMTP id di6mr10091687wjb.2.1454601040863; Thu, 04 Feb 2016 07:50:40 -0800 (PST) Received: from localhost.localdomain ([195.55.142.58]) by smtp.gmail.com with ESMTPSA id q73sm26885838wmb.1.2016.02.04.07.50.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 07:50:40 -0800 (PST) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, matt@codeblueprint.co.uk, catalin.marinas@arm.com Subject: [PATCH v2 2/7] arm64: vmlinux.lds.S: handle .init.rodata.xxx and .init.bss sections Date: Thu, 4 Feb 2016 16:50:25 +0100 Message-Id: <1454601030-9093-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1454601030-9093-1-git-send-email-ard.biesheuvel@linaro.org> References: <1454601030-9093-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160204_155102_168616_BC7F8D9A X-CRM114-Status: GOOD ( 10.17 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on casper.infradead.org summary: Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, Ard Biesheuvel , will.deacon@arm.com, jeremy.linton@arm.com, suzuki.poulose@arm.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org The EFI stub is typically built into the decompressor (x86, ARM) so none of its symbols are annotated as __init. However, on arm64, the stub is linked into the kernel proper, and the code is __init annotated at the section level by prepending all names of SHF_ALLOC sections with '.init'. This results in section names like .init.rodata.str1.8 (for string literals) and .init.bss (which is tiny), both of which can be moved into the .init.data output section. Acked-by: Will Deacon Acked-by: Mark Rutland Tested-by: Mark Rutland Reviewed-by: Matt Fleming Signed-off-by: Ard Biesheuvel --- arch/arm64/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) -- 2.5.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index e3928f578891..cbf4db440e9c 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -134,6 +134,7 @@ SECTIONS CON_INITCALL SECURITY_INITCALL INIT_RAM_FS + *(.init.rodata.* .init.bss) /* from the EFI stub */ } .exit.data : { ARM_EXIT_KEEP(EXIT_DATA)