From patchwork Wed Feb 17 12:35:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Fleming X-Patchwork-Id: 62106 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp2258146lbl; Wed, 17 Feb 2016 04:39:01 -0800 (PST) X-Received: by 10.66.62.195 with SMTP id a3mr1823207pas.28.1455712741453; Wed, 17 Feb 2016 04:39:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id kx15si1783681pab.43.2016.02.17.04.39.01; Wed, 17 Feb 2016 04:39:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dkim=pass header.i=@codeblueprint-co-uk.20150623.gappssmtp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934545AbcBQMjA (ORCPT + 30 others); Wed, 17 Feb 2016 07:39:00 -0500 Received: from mail-wm0-f48.google.com ([74.125.82.48]:33709 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161473AbcBQMgR (ORCPT ); Wed, 17 Feb 2016 07:36:17 -0500 Received: by mail-wm0-f48.google.com with SMTP id g62so235314515wme.0 for ; Wed, 17 Feb 2016 04:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codeblueprint-co-uk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1JodsmTD6eRtLTRh2eLnTct86qxHz17UgGqIxJavx/w=; b=oxg+I4CLdtWUYYsHHVdNcFlbw4k32KHFjGf9hTrp9eXOqptVg8VbBZMOSpgnqsMK0F qdXnlXzV7SYoZY1F62f6Mz92GP+6DoxzQmz97uU/qt/AYsnreNkt812qASxpJ8cMC4L8 g27pr/3lDvOV4gkRmPB9uTDLEcgMPLRTzXh7v42OeXMP31ygqoWuwMvsNT0Q4f8UzHzG jb+4M7s8zVZOKhPOQkzkDlrQ2NWknPSzx1a96rapLCimYkrbGx/4IrnsbkOg44xT8DGz PKeMLPP6d62OyPSZEN7EtHidaAFbXP9WN0JwvuUDmUG6peFwaUrTSKgM6M0lzwJNwyRA 7WDw== 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=1JodsmTD6eRtLTRh2eLnTct86qxHz17UgGqIxJavx/w=; b=jWHUswcpISij8A8U8pOeaL4Oz/EVn+2zoSfiSLS8HLWg0JiTHRpdOHEvwdOQioDC1p U6WqmExgykIAmmBQ/PAgEsOLnN0dfZGQRKwMxB6qiOxYtZQQBnNF1qqpcLpkkPXUPZkV aYsRRZZjMqACDLKBLJLu1Z4LoDo+PjzVCXi/H4xnBhhNGbOWVjyhDZhP0aeA9s8mDxbJ HEIq2KfzHzkUcrOBAhogra2XnNqELUS04ClRvCJCTjlPOQy50UPYZpOphRw1gi9/RiW2 +Zingzj3BLDd/X5coy/pXA1HgCk6wtYBxR5w1Bm+9QiBhiCgwQMQmKPZL8zzgbhXvO5n S0vQ== X-Gm-Message-State: AG10YOSPL3dQRSkFesmZHqiNot1Ohdz/NzZOy9g1oIq97koBAh3MQ14/tQNF33Dt29+ozw== X-Received: by 10.194.76.211 with SMTP id m19mr1891814wjw.113.1455712576913; Wed, 17 Feb 2016 04:36:16 -0800 (PST) Received: from localhost (5ec16434.skybroadband.com. [94.193.100.52]) by smtp.gmail.com with ESMTPSA id g1sm31461183wmc.0.2016.02.17.04.36.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Feb 2016 04:36:16 -0800 (PST) From: Matt Fleming To: Ingo Molnar , Thomas Gleixner , "H . Peter Anvin" Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, linux-efi@vger.kernel.org, Matt Fleming , Mark Rutland , Will Deacon Subject: [PATCH 05/13] arm64: vmlinux.lds.S: Handle .init.rodata.xxx and .init.bss sections Date: Wed, 17 Feb 2016 12:35:58 +0000 Message-Id: <1455712566-16727-6-git-send-email-matt@codeblueprint.co.uk> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1455712566-16727-1-git-send-email-matt@codeblueprint.co.uk> References: <1455712566-16727-1-git-send-email-matt@codeblueprint.co.uk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ard Biesheuvel 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 Signed-off-by: Ard Biesheuvel Signed-off-by: Matt Fleming --- arch/arm64/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) -- 2.6.2 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)