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 B7E9AC636D3 for ; Tue, 7 Feb 2023 22:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbjBGWdH (ORCPT ); Tue, 7 Feb 2023 17:33:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229732AbjBGWdE (ORCPT ); Tue, 7 Feb 2023 17:33:04 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2621238B4B for ; Tue, 7 Feb 2023 14:33:04 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B126A61320 for ; Tue, 7 Feb 2023 22:33:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70521C433D2; Tue, 7 Feb 2023 22:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1675809183; bh=pRMdbCPpUDgsLpUiYoKb0mWWBWHKfkLHQvPGx+ldOq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vII49AhK7i9eNITaQdC/CphaA4sDWF6OZrjsJWgLxXzOAvL3gYgYPjM7A3BU4NdNQ XQR8/Po1n8EPIz3ovQdeCyEbotF7NwVjtgm2SV7K1wNTwL3gR0aJJCiacZ38OGV4gw THVXAD0CqDV2jBOWsD0IDXc4V/37oZBuoLwWeaONcRXCmcUBLr0ip+ZqqrXM3tG/YF 0A2mn/n9AK6nTTaQaYISAlhNYI6nzX6KRadAGM9C58UhleqiupKgcESH+grn83Tl5A AbPvpQATe843oO0h150TxyUrKrFr5BZke9LOayEtBzHNL/DlcGZKR6+Ca1S1OL/e38 XbuY4NccTp0ag== From: SeongJae Park To: Masahiro Yamada Cc: Richard Weinberger , Anton Ivanov , Johannes Berg , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, SeongJae Park , Palmer Dabbelt Subject: Re: [PATCH] UML: define RUNTIME_DISCARD_EXIT Date: Tue, 7 Feb 2023 22:33:00 +0000 Message-Id: <20230207223300.74593-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230207164156.537378-1-masahiroy@kernel.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masahiro, On Wed, 8 Feb 2023 01:41:56 +0900 Masahiro Yamada wrote: > With CONFIG_VIRTIO_UML=y, GNU ld < 2.36 fails to link UML vmlinux > (w/wo CONFIG_LD_SCRIPT_STATIC). > > `.exit.text' referenced in section `.uml.exitcall.exit' of arch/um/drivers/virtio_uml.o: defined in discarded section `.exit.text' of arch/um/drivers/virtio_uml.o > collect2: error: ld returned 1 exit status > > This fix is similar to the following commits: > > - 4b9880dbf3bd ("powerpc/vmlinux.lds: Define RUNTIME_DISCARD_EXIT") > - a494398bde27 ("s390: define RUNTIME_DISCARD_EXIT to fix link error > with GNU ld < 2.36") > - c1c551bebf92 ("sh: define RUNTIME_DISCARD_EXIT") > > Fixes: 99cb0d917ffa ("arch: fix broken BuildID for arm64 and riscv") > Reported-by: SeongJae Park > Signed-off-by: Masahiro Yamada Tested-by: SeongJae Park Thanks. SJ > --- > > arch/um/kernel/vmlinux.lds.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S > index 16e49bfa2b42..53d719c04ba9 100644 > --- a/arch/um/kernel/vmlinux.lds.S > +++ b/arch/um/kernel/vmlinux.lds.S > @@ -1,4 +1,4 @@ > - > +#define RUNTIME_DISCARD_EXIT > KERNEL_STACK_SIZE = 4096 * (1 << CONFIG_KERNEL_STACK_ORDER); > > #ifdef CONFIG_LD_SCRIPT_STATIC > -- > 2.34.1 >