From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8B24C433C1 for ; Fri, 19 Mar 2021 18:58:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C47BE61934 for ; Fri, 19 Mar 2021 18:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbhCSS6X (ORCPT ); Fri, 19 Mar 2021 14:58:23 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:44544 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230523AbhCSS6S (ORCPT ); Fri, 19 Mar 2021 14:58:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616180297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=pDVcUSuxN+AGx4nzch+V6p1eawpIf3wS5PvMlDH1DPI=; b=XXggucJPAT1NDPdgFflNzzzvjykcHuaO9PIQhOtc0EaEo6y8Iz0cjw9C07Fi693fHvTspf 75AyJa4wnUTSeED4qvb0DUfjD/li5Gt65Ifhkr1xI9gdhsMEncWQgtW+EEya6hGDAP6iYE AQraD4P6ntw7BSbk3XE9ceQoojg8+es= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-225-36S8nsVTMcqeiOWzlWQ6zw-1; Fri, 19 Mar 2021 14:58:15 -0400 X-MC-Unique: 36S8nsVTMcqeiOWzlWQ6zw-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DCBE29CC00; Fri, 19 Mar 2021 18:58:13 +0000 (UTC) Received: from krava (unknown [10.40.195.94]) by smtp.corp.redhat.com (Postfix) with SMTP id 2BD2110016FD; Fri, 19 Mar 2021 18:58:12 +0000 (UTC) Date: Fri, 19 Mar 2021 19:58:11 +0100 From: Jiri Olsa To: Andrii Nakryiko Cc: Andrii Nakryiko , bpf , Networking , Alexei Starovoitov , Daniel Borkmann , Kernel Team Subject: Re: [PATCH v4 bpf-next 07/12] libbpf: add BPF static linker BTF and BTF.ext support Message-ID: References: <20210318194036.3521577-1-andrii@kernel.org> <20210318194036.3521577-8-andrii@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, Mar 19, 2021 at 11:39:01AM -0700, Andrii Nakryiko wrote: > On Fri, Mar 19, 2021 at 9:23 AM Jiri Olsa wrote: > > > > On Thu, Mar 18, 2021 at 12:40:31PM -0700, Andrii Nakryiko wrote: > > > > SNIP > > > > > + > > > + return NULL; > > > +} > > > + > > > +static int linker_fixup_btf(struct src_obj *obj) > > > +{ > > > + const char *sec_name; > > > + struct src_sec *sec; > > > + int i, j, n, m; > > > + > > > + n = btf__get_nr_types(obj->btf); > > > > hi, > > I'm getting bpftool crash when building tests, > > > > looks like above obj->btf can be NULL: > > I lost if (!obj->btf) return 0; somewhere along the rebases. I'll send > a fix shortly. But how did you end up with selftests BPF objects built > without BTF? no idea.. I haven't even updated llvm for almost 3 days now ;-) jirka