Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2864253pxk; Tue, 15 Sep 2020 04:32:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyLZ6W1cVaKzIaNapbVz5gRuPlD1C4O0tlsOF/arXQsN3WfOJ2PEBTIbbpe61Q70QOzDIMG X-Received: by 2002:a17:906:f8d2:: with SMTP id lh18mr20287471ejb.44.1600169529533; Tue, 15 Sep 2020 04:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600169529; cv=none; d=google.com; s=arc-20160816; b=Q2RDrr1BO4aEd+Frlcg3m35JPuUPJoDhlY7yHazCHWZAGoj98ZzNmJ4CZpBxbFe2A8 JACMlUfY46flt4UrWTrbPV9hHLAVV/0KDFjssb62wLV0JCSn2y/lZBFwl4itt0mBFfc7 mI5eK72Uew2/vlabVrBQpbvmc55JSkwKMRBm0RFaZl/N688ZL2f1d2Penpo8NkPyrjJ4 XRXA3Ap0N3s5AEcUwWnhuCfivvWDHzJ6KIMXy6dxzmz8b5p6mUG/CmBxwzR5BwmDczP3 7QKvN0mrBsRaPeckZYFoBv4faNyHKevONcoTdLSKmzP94/J3wDxeM9YMxQN4blYgOoFa 8H6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=v+WVb9G03n0rH8lcZLHBwWOZjqVdLxBpnbAsrbNVU/U=; b=jgDjKAfj/IAIcVZ6X6sRrWNaS6ogcgE5CYne4L6GM6byOkoqo7xtBb41zmaPlFs5Ug aGFci+cdhnMYrrnCErGgLh2L638u7TyxJq5wmWWOnFJlXwMVmKsYa0v+Oyq7l907+aOQ KkgzSBh5MlMtL6QqEqFHHVZQAZ1clfkHXNXqjJeQjlJ3QugfzgoC6ESHhKnCCKGkLCYK NTu7d+Zyar+pQOMbiYA/rtb57yDRcJZs0NBASoz7npuMZATYh70eso9VFtvJt15hXBJr T05SfB4RNKVeoSqrjdtv3t1ovgqFIrCJWRqjOBSFEhUk3xC7z8gSJcbFVrtnoqvszDSl wVzQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i3si6479032edf.260.2020.09.15.04.31.47; Tue, 15 Sep 2020 04:32:09 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726119AbgIOLZl convert rfc822-to-8bit (ORCPT + 99 others); Tue, 15 Sep 2020 07:25:41 -0400 Received: from wildebeest.demon.nl ([212.238.236.112]:59090 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726137AbgIOLYZ (ORCPT ); Tue, 15 Sep 2020 07:24:25 -0400 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 6D5F830002FC; Tue, 15 Sep 2020 13:24:17 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id CE8B440006CE; Tue, 15 Sep 2020 13:24:17 +0200 (CEST) Message-ID: Subject: Re: Static call dependency on libelf version? From: Mark Wielaard To: peterz@infradead.org, Hugh Dickins Cc: Josh Poimboeuf , linux-kernel@vger.kernel.org, x86@kernel.org Date: Tue, 15 Sep 2020 13:24:17 +0200 In-Reply-To: <20200915093016.GV1362448@hirez.programming.kicks-ass.net> References: <20200915093016.GV1362448@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Mailer: Evolution 3.28.5 (3.28.5-8.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gnu.wildebeest.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org H Peter, On Tue, 2020-09-15 at 11:30 +0200, peterz@infradead.org wrote: > On Tue, Sep 15, 2020 at 12:50:54AM -0700, Hugh Dickins wrote: > > CONFIG_HAVE_STATIC_CALL=y > > CONFIG_HAVE_STATIC_CALL_INLINE=y > > stand out as new in the .config for 5.9-rc5-mm1, and references > > to objtool in static_call.h and static_call_types.h took me to > > tools/objtool/Makefile, with its use of libelf. > > > > I've copied over files of the newer libelf (0.168) to the failing > > machines, which are now building the 5.9-rc5-mm1 vmlinux correctly. > > > > It looks as if CONFIG_HAVE_STATIC_CALL=y depends on a newer libelf > > than I had before (0.155), and should either insist on a minimum > > version, or else be adjusted to work with older versions. > > Hurmph, I have no idea how this happened; clearly none of my machines > have this older libelf :/ (the machines I use most seem to be on > 0.180). > > I'm also not sure what static_call is doing different from say orc > data generation. Both create and fill sections in similar ways. > > Mark, do you have any idea? 0.155 is more than 8 years old. Given that 0.168 (4 years old) works fine and this might be an interaction with objtool, which if I remember correctly uses ELF_C_RDWR to manipulate an ELF file in place, I suspect it might be: commit 88ad5ddb71bd1fa8ed043a840157ebf23c0057b3 Author: Mark Wielaard Date: Tue Nov 5 16:27:32 2013 +0100 libelf: Write all section headers if elf flags contains ELF_F_DIRTY. When ehdr e_shoff changes, elf flags is set dirty. This indicates that the section header moved because sections were added/removed or changed in size. Reported-by: Jiri Slaby Signed-off-by: Mark Wielaard Which is described as elfutils-0.157-15-g88ad5ddb so was in elfutils 0.158, but not before. At least the issue seems to mimics the bug report a little: https://sourceware.org/legacy-ml/elfutils-devel/imported/msg03724.html But all this is for ancient versions of elfutils libelf. So it is hard to say and my memory might be failing. If someone can confirm 0.158 (which is 6 years old) works fine I would pick that as minimum version, otherwise simply go with 0.168 which is 4 years old and should be on most systems by now. Cheers, Mark