Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05D2FC38142 for ; Wed, 1 Feb 2023 09:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbjBAJ34 (ORCPT ); Wed, 1 Feb 2023 04:29:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231835AbjBAJ3w (ORCPT ); Wed, 1 Feb 2023 04:29:52 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A4BD5D92A for ; Wed, 1 Feb 2023 01:29:47 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 65B7C20C18; Wed, 1 Feb 2023 09:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675243786; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=ZtqBgP0AGs6SQ4ie1vGRzTacBLiHDv2NjEvV/Sonvoc=; b=g8a6hULNmeOGxurTr3NH6AU1kzPMlRC4t88ddkfg14jAC2dJ8QMdTdXjY18NS3rKb4sSev hXuoIb+Unl8cvtmb8pxbMzbhJNcV/4aMLNweI4iRSbcEfoVQKMwuaCeYOX/LfGH3u+LhQC S6vHZTOBht3kpRTgxBfjh6V+QZMfhFg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675243786; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=ZtqBgP0AGs6SQ4ie1vGRzTacBLiHDv2NjEvV/Sonvoc=; b=hFpv4nP+FrgBkmpGri7+bIYsfCjJiih8pOJCfg6xsDoNtFcxYf15yRaFjM1IoTzpXkC2p3 vnYjvYfC+0rRHDBw== Received: from hawking.suse.de (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 2A9F32C141; Wed, 1 Feb 2023 09:29:46 +0000 (UTC) Received: by hawking.suse.de (Postfix, from userid 17005) id D90D04437FE; Wed, 1 Feb 2023 10:29:45 +0100 (CET) From: Andreas Schwab To: linux-riscv@lists.infradead.org Cc: Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org Subject: [PATCH] riscv: disable generation of unwind tables X-Yow: Here I am in the POSTERIOR OLFACTORY LOBULE but I don't see CARL SAGAN anywhere!! Date: Wed, 01 Feb 2023 10:29:45 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- arch/riscv/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile index faf2c2177094..82153960ac00 100644 --- a/arch/riscv/Makefile +++ b/arch/riscv/Makefile @@ -80,6 +80,9 @@ ifeq ($(CONFIG_PERF_EVENTS),y) KBUILD_CFLAGS += -fno-omit-frame-pointer 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) -- 2.39.1 -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."