Received: by 2002:a4f:b056:0:0:0:0:0 with SMTP id m22csp2674245ivi; Tue, 15 Sep 2020 16:25:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ/km3no33mQIWdhXJ9Uwiyi/+rcWgM3t9HPB3oUr28F29yNcma8EO+GnaA+EgL72oBPP4 X-Received: by 2002:a17:906:358c:: with SMTP id o12mr22082312ejb.406.1600212315373; Tue, 15 Sep 2020 16:25:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600212315; cv=none; d=google.com; s=arc-20160816; b=ulH6mysNHRgj55Avxuw6/cWdkZ9eaQk/qUb6/AYXCG+8UfZzxYMvOVEG9UHbElG7HY X3I1K69anS4tPAv/vp01qhOuaUWdtQ8qTrVt9vqCRzl07P3IZDwTT2Uc4a2Tma06zoJk d+q/I6UPkWDOrhSN8BqByLQ/BO52rxTy49OPmaqGDKyYDptzFgUQ8s4RiS91nUnTMeaF z5Lexl6E7orqnQV+iaG8rrsZk2WtNGEMbuE+QejInPKvJoiRX2gzLvI2MCJbDzCe5I+v +sqxbaHEO61oXakJ3HvK79IBmJ+1AMi9R22leB2BP/QAVqZ+p/j9LH12asGTFRtjatzC OH0A== 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=CYylsjdtcVA/o2CaWbVu7B8djfy3gujgU2p1SxRhCS0=; b=TyxKeqNg846RjBCFZBQblyhhOxEaB/RC/P3LpWne3VesOOzqCEqr0L34ZsUKdfr1y/ TWanzoJ8IxV5ukN5gWpjAZoDGh77aqZYlE22Z+W/juDQBOYO1oyf/Fb/wv22gp9iKvO7 t9Dymuj3zTFPNbo+vWQTB2xhL3RpNkE3ANjmQ8i28+cTdPx8epAQg4MKIGbDsWp+hrDH BI1Zh7+U6DU3Eu8o69aJqj8aDQSkgztIADyabKJ22lhil9lCxwEkfblPj64TlIqst5Wg T3C/YLHFmED7eotEK8WePfDlFXgKYAcrT14t5sbxVTWiD4/Ho7xy1da9YZqDSEhDCbgE VH7g== 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 n17si10429370edq.422.2020.09.15.16.24.53; Tue, 15 Sep 2020 16:25:15 -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 S1727424AbgIOXWD convert rfc822-to-8bit (ORCPT + 99 others); Tue, 15 Sep 2020 19:22:03 -0400 Received: from wildebeest.demon.nl ([212.238.236.112]:35494 "EHLO gnu.wildebeest.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726851AbgIOOiG (ORCPT ); Tue, 15 Sep 2020 10:38:06 -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 EFF85300BC89; Tue, 15 Sep 2020 16:38:02 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id C2D9F40006CE; Tue, 15 Sep 2020 16:38:02 +0200 (CEST) Message-ID: <38388294c6ad7bf4abdb1b9a0bac9af5224c8fa6.camel@klomp.org> Subject: Re: Static call dependency on libelf version? From: Mark Wielaard To: Josh Poimboeuf Cc: peterz@infradead.org, Hugh Dickins , linux-kernel@vger.kernel.org, x86@kernel.org Date: Tue, 15 Sep 2020 16:38:02 +0200 In-Reply-To: <20200915141701.j5fnir63trpwqbfp@treble> References: <20200915093016.GV1362448@hirez.programming.kicks-ass.net> <20200915141701.j5fnir63trpwqbfp@treble> 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 Hi Josh, On Tue, 2020-09-15 at 09:17 -0500, Josh Poimboeuf wrote: > On Tue, Sep 15, 2020 at 01:24:17PM +0200, Mark Wielaard wrote: > > 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. > > I just discovered elf_version(), I assume that would allow us to check > and enforce the libelf version? No, sorry. That is for the ELF file format version, which is and has always been version 1 (and I suspect it will be for the next 20 years). There is /usr/include/elfutils/version.h which provides a _ELFUTILS_PREREQ(major, minor) macro if you need something during compile time. Note that in theory libelf is a generic library (there are variants for Solaris and BSD with which we try to be [source] compatible), but the only actively maintained version is the elfutils one. Cheers, Mark