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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7D6BC433F5 for ; Sat, 14 May 2022 03:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230445AbiENDNV (ORCPT ); Fri, 13 May 2022 23:13:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230393AbiENDNU (ORCPT ); Fri, 13 May 2022 23:13:20 -0400 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA7A3347BF1 for ; Fri, 13 May 2022 20:13:18 -0700 (PDT) Received: from pps.filterd (m0148460.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 24DNXK2E016615 for ; Fri, 13 May 2022 20:13:18 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=facebook; bh=0kDh1RWkzea34zBmZ7d//DReMJKkqRot6Z/9I5tdE48=; b=g848L4/Tygz15bvWh/su/Yr19R5SwWFYb/hZyqGhHufvQwNHGjlFQ1qez8aloQ0/SVnG sBJUAwRg893DQ23dzpzXW+Uek+CfJTY6j5NHonAzAQmTjW9n48JuOLIBoSUKpngJjvd0 CYt359BqQ2XFx14JJ6Nd9aI8CP2vKrcX9Co= Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3g19wa16t7-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Fri, 13 May 2022 20:13:18 -0700 Received: from twshared11660.23.frc3.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:82::e) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 13 May 2022 20:13:17 -0700 Received: by devbig309.ftw3.facebook.com (Postfix, from userid 128203) id DD39DA45F4A8; Fri, 13 May 2022 20:13:08 -0700 (PDT) From: Yonghong Song To: CC: Alexei Starovoitov , Andrii Nakryiko , Daniel Borkmann , Subject: [PATCH bpf-next v2 09/18] libbpf: Add enum64 support for bpf linking Date: Fri, 13 May 2022 20:13:08 -0700 Message-ID: <20220514031308.3244041-1-yhs@fb.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220514031221.3240268-1-yhs@fb.com> References: <20220514031221.3240268-1-yhs@fb.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-FB-Internal: Safe Content-Type: text/plain X-Proofpoint-ORIG-GUID: cqOI6eQZq9Wt9BzJuE3wDh2U_VsaCy-E X-Proofpoint-GUID: cqOI6eQZq9Wt9BzJuE3wDh2U_VsaCy-E X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.486,FMLib:17.11.64.514 definitions=2022-05-13_11,2022-05-13_01,2022-02-23_01 Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Add BTF_KIND_ENUM64 support for bpf linking, which is very similar to BTF_KIND_ENUM. Signed-off-by: Yonghong Song --- tools/lib/bpf/linker.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/lib/bpf/linker.c b/tools/lib/bpf/linker.c index 9aa016fb55aa..979b150affb9 100644 --- a/tools/lib/bpf/linker.c +++ b/tools/lib/bpf/linker.c @@ -1340,6 +1340,7 @@ static bool glob_sym_btf_matches(const char *sym_na= me, bool exact, case BTF_KIND_STRUCT: case BTF_KIND_UNION: case BTF_KIND_ENUM: + case BTF_KIND_ENUM64: case BTF_KIND_FWD: case BTF_KIND_FUNC: case BTF_KIND_VAR: @@ -1362,6 +1363,7 @@ static bool glob_sym_btf_matches(const char *sym_na= me, bool exact, case BTF_KIND_INT: case BTF_KIND_FLOAT: case BTF_KIND_ENUM: + case BTF_KIND_ENUM64: /* ignore encoding for int and enum values for enum */ if (t1->size !=3D t2->size) { pr_warn("global '%s': incompatible %s '%s' size %u and %u\n", --=20 2.30.2