From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0911A63B8 for ; Mon, 20 Feb 2023 13:41:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84234C433EF; Mon, 20 Feb 2023 13:41:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1676900463; bh=+VNEvFR0hcVxYKf6fPnTtYUnEJn0IqliMjQ1wYlYIls=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j0vvMQ2TKh3hph+7+/c5vR0wvG7W7EziVBhBEHCIuks7cG9+JA1J0CEz4quj4iFiU 1KbvqykuSBIK0QgcoaWp+8G4FbkzDmfoykoeV5r0XOmjrc/hY/ZxKlqSM3WSGr1Cik cDU5OMElbxqWwmkGKOGbWtyMRz0Hp2cfgVbMhCsw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Andreas Schwab , Palmer Dabbelt Subject: [PATCH 4.19 35/89] riscv: disable generation of unwind tables Date: Mon, 20 Feb 2023 14:35:34 +0100 Message-Id: <20230220133554.383098794@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230220133553.066768704@linuxfoundation.org> References: <20230220133553.066768704@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Andreas Schwab commit 2f394c0e7d1129a35156e492bc8f445fb20f43ac upstream. GCC 13 will enable -fasynchronous-unwind-tables by default on riscv. In the kernel, we don't have any use for unwind tables yet, so disable them. More importantly, the .eh_frame section brings relocations (R_RISC_32_PCREL, R_RISCV_SET{6,8,16}, R_RISCV_SUB{6,8,16}) into modules that we are not prepared to handle. Signed-off-by: Andreas Schwab Link: https://lore.kernel.org/r/mvmzg9xybqu.fsf@suse.de Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt Signed-off-by: Greg Kroah-Hartman --- arch/riscv/Makefile | 3 +++ 1 file changed, 3 insertions(+) --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -72,6 +72,9 @@ ifeq ($(CONFIG_MODULE_SECTIONS),y) KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/riscv/kernel/module.lds endif +# Avoid generating .eh_frame sections. +KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables + KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax) KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma)-mno-relax)