From patchwork Fri Mar 9 03:20:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 10269599 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E5D06037E for ; Fri, 9 Mar 2018 03:25:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CFF429C8B for ; Fri, 9 Mar 2018 03:25:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8165B29CA5; Fri, 9 Mar 2018 03:25:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F5BB29C8B for ; Fri, 9 Mar 2018 03:25:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=RKgCD33Kb23BsMNDPk/b/nb3670zvAMfcXK0wOC17ow=; b=Xh7edwoYL4O2WuwDivVPCgx5um HKyqcy+o5AjvW5Bk9flvXkWf7LyZe4K0xSL9vNlCJ/wo/64PLtW+STm6ggnzR2O9+X+j06cNulkX4 aGF279umX1J0IPVLN4t3u7h3mBFsLfQjYwuvAoXsJ5SfJatQX0FHkF93CCMVDdqPH+ZWnI6IRZybj FX84Ml6FbhxF2IfUzT/ZZbbFfsYoolu4XMixF0bVeK8wMVNZQLjJlW9aLzPw+zsTOlB7T3o2+6ysB cIsUqHCICOioExx7Qm4tDCiVMcWJaRKUNoVPo5d0RsQnNyfT4Y4br3N/kZbt8TOU/0RboUm8JREcr dllErTWw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1eu8eo-0002oB-Bp; Fri, 09 Mar 2018 03:25:22 +0000 Received: from pb-smtp1.pobox.com ([64.147.108.70]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1eu8bW-0000Dc-Q5 for linux-arm-kernel@lists.infradead.org; Fri, 09 Mar 2018 03:22:05 +0000 Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id CEBBAD55E9; Thu, 8 Mar 2018 22:21:30 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references; s=sasl; bh=aRNk g/PPIeMYNej1oFmrqJFM8UU=; b=nVWc5Pc5b88pK/3nLm3fdjRKZHrStbDWW1N3 oorP7Q27ZjJgCJ79Gd4m0/nrpVGTYxVd+8L9fmayI8yrlckgkIDE5/5xwOcvSX2P CPPhvlgXgNTK79rA69ib1LhbNBf/UsnCY7fU5lsktscpL8PvEC9hJXhPR+z0CE5G +djMsa4= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id C5D32D55DF; Thu, 8 Mar 2018 22:21:29 -0500 (EST) Received: from yoda.home (unknown [70.82.104.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 37836D55D7; Thu, 8 Mar 2018 22:21:29 -0500 (EST) Received: from xanadu.home (xanadu.home [192.168.2.2]) by yoda.home (Postfix) with ESMTP id 7D9722DA05DD; Thu, 8 Mar 2018 22:21:28 -0500 (EST) From: Nicolas Pitre To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/7] ARM: linker script: factor out stuff for the .text section Date: Thu, 8 Mar 2018 22:20:56 -0500 Message-Id: <20180309032100.31039-4-nicolas.pitre@linaro.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309032100.31039-1-nicolas.pitre@linaro.org> References: <20180309032100.31039-1-nicolas.pitre@linaro.org> X-Pobox-Relay-ID: F5277CD4-2348-11E8-9924-44CE1968708C-78420484!pb-smtp1.pobox.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180308_192159_643244_18E13929 X-CRM114-Status: GOOD ( 11.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Chris Brandt , Russell King - ARM Linux MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Move common entries to vmlinux.lds.h as ARM_TEXT. Signed-off-by: Nicolas Pitre --- arch/arm/kernel/vmlinux-xip.lds.S | 19 +------------------ arch/arm/kernel/vmlinux.lds.S | 19 +------------------ arch/arm/kernel/vmlinux.lds.h | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 36 deletions(-) diff --git a/arch/arm/kernel/vmlinux-xip.lds.S b/arch/arm/kernel/vmlinux-xip.lds.S index 4bd422966d..4ddb547b19 100644 --- a/arch/arm/kernel/vmlinux-xip.lds.S +++ b/arch/arm/kernel/vmlinux-xip.lds.S @@ -53,24 +53,7 @@ SECTIONS .text : { /* Real text segment */ _stext = .; /* Text and read-only data */ - IDMAP_TEXT - __entry_text_start = .; - *(.entry.text) - __entry_text_end = .; - IRQENTRY_TEXT - SOFTIRQENTRY_TEXT - TEXT_TEXT - SCHED_TEXT - CPUIDLE_TEXT - LOCK_TEXT - HYPERVISOR_TEXT - KPROBES_TEXT - *(.gnu.warning) - *(.glue_7) - *(.glue_7t) - . = ALIGN(4); - *(.got) /* Global offset table */ - ARM_CPU_KEEP(PROC_INFO) + ARM_TEXT } RO_DATA(PAGE_SIZE) diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index b34fbafd54..a02a96c651 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -56,24 +56,7 @@ SECTIONS .text : { /* Real text segment */ _stext = .; /* Text and read-only data */ - IDMAP_TEXT - __entry_text_start = .; - *(.entry.text) - __entry_text_end = .; - IRQENTRY_TEXT - SOFTIRQENTRY_TEXT - TEXT_TEXT - SCHED_TEXT - CPUIDLE_TEXT - LOCK_TEXT - HYPERVISOR_TEXT - KPROBES_TEXT - *(.gnu.warning) - *(.glue_7) - *(.glue_7t) - . = ALIGN(4); - *(.got) /* Global offset table */ - ARM_CPU_KEEP(PROC_INFO) + ARM_TEXT } #ifdef CONFIG_DEBUG_ALIGN_RODATA diff --git a/arch/arm/kernel/vmlinux.lds.h b/arch/arm/kernel/vmlinux.lds.h index 1258b66487..0ef86d75a0 100644 --- a/arch/arm/kernel/vmlinux.lds.h +++ b/arch/arm/kernel/vmlinux.lds.h @@ -58,3 +58,23 @@ ARM_MMU_DISCARD(*(__ex_table)) \ *(.discard) \ *(.discard.*) + +#define ARM_TEXT \ + IDMAP_TEXT \ + __entry_text_start = .; \ + *(.entry.text) \ + __entry_text_end = .; \ + IRQENTRY_TEXT \ + SOFTIRQENTRY_TEXT \ + TEXT_TEXT \ + SCHED_TEXT \ + CPUIDLE_TEXT \ + LOCK_TEXT \ + HYPERVISOR_TEXT \ + KPROBES_TEXT \ + *(.gnu.warning) \ + *(.glue_7) \ + *(.glue_7t) \ + . = ALIGN(4); \ + *(.got) /* Global offset table */ \ + ARM_CPU_KEEP(PROC_INFO)