From patchwork Mon Feb 15 15:26:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 382963 Delivered-To: patch@linaro.org Received: by 2002:a02:c80e:0:0:0:0:0 with SMTP id p14csp1174576jao; Mon, 15 Feb 2021 07:42:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4hLOvR4hpWWYT5BdlaXgdjNG+7AZhC4mVuTKnSjp5HQEa9zdRRNoWF3pP/OG4CsNk65dE X-Received: by 2002:a17:906:4d12:: with SMTP id r18mr5095204eju.406.1613403753432; Mon, 15 Feb 2021 07:42:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613403753; cv=none; d=google.com; s=arc-20160816; b=LM1Hn1gITFJ4idxu+oCVaNRUOu/8Q775G3HijTZ3JMxhHXWs2YC2YiM6vaROJHy1KG Q8EC2zYe2FNdBUdyUaPgAllMdwocOatanxS+47QdsA6sZkpzqUw67okFpujnqB27RjVh +wrkGLN1KTH3JBZjENgHBnU28X0vEmaizSu8nM0sN6diuEV0YdAoHmYflYvT0tfSjHjf 0y8HdWkBYC6Skhmo+SRye7kQocOZsfcy8gC+LpEvAmrUpbzI3n/HgYUmpAXmxaOI2+HI Bn84ARnrItuhFXDFs0/UG5zjoOVYydeV5Cmp07PyB3rPRqNWOnRWmYXYXrVRyhfH8JeA +9oQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3hZo6AO0XDHXYjGoOZ3HywP4lHtPNYN0/EOU5B5lsPY=; b=OLf3itpAhD4wAXQvvNval26HNmF4D9ZskNKVnHfIYD4LSBW2vKwmfLCoFlshOEDP0T q4k/PexSvw/5DuaB34SdizIXWqmueKeqBZ2NZedfNBHMaChjRhWTHA2iQ0WunO3VOSR+ npdlRT+qL8KyMC2HZUapLMRdcXXeYNgkeLrcAR5AZXeOOySWEtncSWilOfmdS7Ehf0vG ZiInN77u+WfsJA5157cqAtx83wVD0ItWIW9juCJqIeiZ+vq/QTqV9FLVxu+0xHe6H1Oa DgLJcPzX/Rwbu/3RniZ0dQO/cxVzrhoNiACxT87HoxAXdVDo62yI1DXTavPn4wiN16um Jgfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=2M7A1NLm; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si12442700ejz.39.2021.02.15.07.42.33; Mon, 15 Feb 2021 07:42:33 -0800 (PST) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=2M7A1NLm; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231524AbhBOPlS (ORCPT + 13 others); Mon, 15 Feb 2021 10:41:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:50362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231569AbhBOPiB (ORCPT ); Mon, 15 Feb 2021 10:38:01 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id B819764EE5; Mon, 15 Feb 2021 15:33:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1613403228; bh=Sg1viS9T1qX7q/DGhQ1LBwL/pdHKMdZ+oy6b1PRCgVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2M7A1NLm6pjaAm4Wyjw6wjlBvyCQsgXtpEtNzb0fwIls+pc0+iGOkiIpIDggxN0rt BJOKCBJWqsdNr2Z0MIEV9G/heJ6Dq8B88QabjgL3BELXjh6wqFI6vW8ZgbGGEUeT1/ OOpy2Ds59eX5UMnrcmwxP5nXknf+5/RQX083rPvo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Masahiro Yamada , Sasha Levin Subject: [PATCH 5.10 040/104] kallsyms: fix nonconverging kallsyms table with lld Date: Mon, 15 Feb 2021 16:26:53 +0100 Message-Id: <20210215152720.772794406@linuxfoundation.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210215152719.459796636@linuxfoundation.org> References: <20210215152719.459796636@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit efe6e3068067212b85c2d0474b5ee3b2d0c7adab ] ARM randconfig builds with lld sometimes show a build failure from kallsyms: Inconsistent kallsyms data Try make KALLSYMS_EXTRA_PASS=1 as a workaround The problem is the veneers/thunks getting added by the linker extend the symbol table, which in turn leads to more veneers being needed, so it may take a few extra iterations to converge. This bug has been fixed multiple times before, but comes back every time a new symbol name is used. lld uses a different set of identifiers from ld.bfd, so the additional ones need to be added as well. I looked through the sources and found that arm64 and mips define similar prefixes, so I'm adding those as well, aside from the ones I observed. I'm not sure about powerpc64, which seems to already be handled through a section match, but if it comes back, the "__long_branch_" and "__plt_" prefixes would have to get added as well. Signed-off-by: Arnd Bergmann Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/kallsyms.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.27.0 diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 7ecd2ccba531b..54ad86d137849 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -112,6 +112,12 @@ static bool is_ignored_symbol(const char *name, char type) "__crc_", /* modversions */ "__efistub_", /* arm64 EFI stub namespace */ "__kvm_nvhe_", /* arm64 non-VHE KVM namespace */ + "__AArch64ADRPThunk_", /* arm64 lld */ + "__ARMV5PILongThunk_", /* arm lld */ + "__ARMV7PILongThunk_", + "__ThumbV7PILongThunk_", + "__LA25Thunk_", /* mips lld */ + "__microLA25Thunk_", NULL };