libbpf: Use .struct_ops.link section to indicate a struct_ops with a link.
authorKui-Feng Lee <kuifeng@meta.com>
Thu, 23 Mar 2023 03:24:04 +0000 (20:24 -0700)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 23 Mar 2023 05:53:02 +0000 (22:53 -0700)
commit809a69d61899f6b79a8e9de474cd93249580fdaf
tree1a4f0fc77743b396c992609bb3e6ade844a3c202
parent912dd4b0c2a50a839301520badb241f36664ae07
libbpf: Use .struct_ops.link section to indicate a struct_ops with a link.

Flags a struct_ops is to back a bpf_link by putting it to the
".struct_ops.link" section.  Once it is flagged, the created
struct_ops can be used to create a bpf_link or update a bpf_link that
has been backed by another struct_ops.

Signed-off-by: Kui-Feng Lee <kuifeng@meta.com>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20230323032405.3735486-8-kuifeng@meta.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
tools/lib/bpf/libbpf.c