libbpf: add bpf_core_type_matches() helper macro
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 6 Jul 2022 03:56:48 +0000 (20:56 -0700)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 6 Jul 2022 04:15:19 +0000 (21:15 -0700)
commitb8a195dc299391bc171c47971974ec6d5ea6fb14
tree63e855285962578ce692db6cdfbc96ed5f6a82c3
parentec6209c8d42f815bc3bef10934637ca92114cd1b
libbpf: add bpf_core_type_matches() helper macro

This patch finalizes support for the proposed type match relation in libbpf by
adding bpf_core_type_matches() macro which emits TYPE_MATCH relocation.

Clang support for this relocation was added in [0].

  [0] https://reviews.llvm.org/D126838

Signed-off-by: Daniel Müller <deso@posteo.net>¬
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>¬
Link: https://lore.kernel.org/bpf/20220628160127.607834-7-deso@posteo.net¬
tools/lib/bpf/bpf_core_read.h