Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp1594132pxb; Sun, 10 Jan 2021 03:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJkIy7gYP8ea/nWjPqSFUgcsL0RrUF//yFy8AW2PzvkasWf1HuEPnVNxskMIOOHzzgXrhY X-Received: by 2002:a50:fc9a:: with SMTP id f26mr10797534edq.255.1610279966593; Sun, 10 Jan 2021 03:59:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610279966; cv=none; d=google.com; s=arc-20160816; b=ShmLVVUwRFU9wU3mDfoTO+2FDSc/evhCkSS4Yt2WIjMGZZE5vd7dGRU2m3xtzxQZrJ 4bNl76W6AqbewB3YaQZ8CfECrRiwB7ZSLfRq7gvTNrI9MduPvc6wJUmv31BFm/+8rqvc DLFJRGkBuEYy25JWlOTfTGrLP1jW5ZTotYN2DyPMRf4ApMT/s1aFLWqC/nFbj6uzni0a 1ee9RSIJNeftay8rvbWZylKTt1fbV7cNYg+4EgaruANntl4JiP5aZVjuD7TDVqgXCBQm fnM2u5UCBb0RgRhuY5uI3OwdGO2OiayqTIvG/3TxkPCwEXhH+7PvcAnaIZMJNvCEPfbE BdWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=e3Fx1xMuOcodd9nkft6VXE99Jq/7Rxy9CCIA9/ZKpTI=; b=mGIJV29HFxMDlSBYQa+9Gr+j3Et9MqwTKmubR768ISjaz5MdXGf0ogLwFsTAQsEzul RslzjzAUiLVKc8lbh4H1b+6Him2gTE4iBR3FpEgoYGxP5HbLn+QIVO6bLBYPVq6JptHJ x2nPYO/bOIOqOfUVRkxRDAT3ka/wuZMdaHNDi5GR5rRvg1mURuqo/6AYnvauDfXUIYxg WhKIyxHjFR/Au56ZbsZfF8pY2I9D68/XbLqLv8yii7Z/5tKxCMPIYk4RvigtSQgCIAuE aMDRQhNbHUATwtaE4Vku1d4r5JwUlyGfVkduKOQaHGz1gk5f1DZnhCXNzkeqZvOqkVF3 beng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=jaBr7GOj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oi22si6080049ejb.631.2021.01.10.03.59.03; Sun, 10 Jan 2021 03:59:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=jaBr7GOj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726624AbhAJL5C (ORCPT + 99 others); Sun, 10 Jan 2021 06:57:02 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:37941 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbhAJL5C (ORCPT ); Sun, 10 Jan 2021 06:57:02 -0500 Date: Sun, 10 Jan 2021 11:56:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1610279780; bh=e3Fx1xMuOcodd9nkft6VXE99Jq/7Rxy9CCIA9/ZKpTI=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=jaBr7GOjsRY8ora1Ne+lK75KOkB1QTdD3G2VKgTQUzreZm6mRjkkoAiYSSSCarNsj Yg3hZgqmPn3TUctk956YIgMEUoaAnQ/NBpofBjSgSR0chTny6RcL/DT8rmCeJGdtCa Gej3Rbk+1ziZ3oIejDY807ocMKC+EeJwDpI9cJXxEBI8EVVb4UlezbUXxWP3QPexie MmgjVwyMbWKp7LvZysDmIBCIiKxWudE+NJc2WRi0jgrsbulghpynJBkj56AllUNbXT U2Sn3zUkR+YUUJJgyX6bY2y5/yMGcwOul/4J7E6ZljwLQZDvOX5FNfeDatpPrBs3kc 157NhWME+OBUQ== To: Thomas Bogendoerfer From: Alexander Lobakin Cc: Arnd Bergmann , Nathan Chancellor , Nick Desaulniers , Huacai Chen , Pei Huang , Kees Cook , Alexander Lobakin , Fangrui Song , Jiaxun Yang , Ralf Baechle , Corey Minyard , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, stable@vger.kernel.org, clang-built-linux@googlegroups.com Reply-To: Alexander Lobakin Subject: [PATCH v5 mips-next 2/9] MIPS: CPS: don't create redundant .text.cps-vec section Message-ID: <20210110115546.30970-2-alobakin@pm.me> In-Reply-To: <20210110115546.30970-1-alobakin@pm.me> References: <20210110115245.30762-1-alobakin@pm.me> <20210110115546.30970-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A number of symbols from arch/mips/kernel/cps-vec.S is explicitly placed into '.text.cps-vec' section. There are no direct references to this section, so there's no need to form it. '.balign 0x1000' directive will work anyway. Moreover, this section was being placed in vmlinux differently depending on CONFIG_LD_DEAD_CODE_DATA_ELIMINATION: - with this option enabled, '.text.cps-vec' was being caught by '.text.[0-9a-zA-Z_]*' from include/asm-generic/vmlinux.lds.h; - without this option, '.text.cps-vec' was being caught by discouraging '.text.*' from arch/mips/kernel/vmlinux.lds.S. '.text.*' should not be used in vmlinux linker scripts at all as it silently catches any orphan text sections. So, remove both '.section .text.cps-vec' and '.text.*' from cps-vec.S and vmlinux.lds.S respectively. As said, this does not affect related functions alignment: 80116000 T mips_cps_core_entry 80116028 t not_nmi 80116200 T excep_tlbfill 80116280 T excep_xtlbfill 80116300 T excep_cache 80116380 T excep_genex 80116400 T excep_intex 80116480 T excep_ejtag 80116490 T mips_cps_core_init Signed-off-by: Alexander Lobakin --- arch/mips/kernel/cps-vec.S | 1 - arch/mips/kernel/vmlinux.lds.S | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/mips/kernel/cps-vec.S b/arch/mips/kernel/cps-vec.S index 4db7ff055c9f..975343240148 100644 --- a/arch/mips/kernel/cps-vec.S +++ b/arch/mips/kernel/cps-vec.S @@ -91,7 +91,6 @@ =09.set=09pop =09.endm =20 -.section .text.cps-vec .balign 0x1000 =20 LEAF(mips_cps_core_entry) diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.= S index 83e27a181206..ae1d0b4bdd60 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S @@ -66,7 +66,6 @@ SECTIONS =09=09KPROBES_TEXT =09=09IRQENTRY_TEXT =09=09SOFTIRQENTRY_TEXT -=09=09*(.text.*) =09=09*(.fixup) =09=09*(.gnu.warning) =09} :text =3D 0 --=20 2.30.0