Skip to content

Commit e5e2342

Browse files
ibhagatgnuAlexei Starovoitov
authored andcommitted
docs/bpf: Update documentation for BTF_KIND_FUNC
The vlen bits in the BTF type of kind BTF_KIND_FUNC are used to convey the linkage information for functions. The Linux kernel only supports linkage values of BTF_FUNC_STATIC and BTF_FUNC_GLOBAL at this time. Signed-off-by: Indu Bhagat <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Acked-by: Martin KaFai Lau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
1 parent 3908fcd commit e5e2342

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Documentation/bpf/btf.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,8 @@ No additional type data follow ``btf_type``.
369369
* ``name_off``: offset to a valid C identifier
370370
* ``info.kind_flag``: 0
371371
* ``info.kind``: BTF_KIND_FUNC
372-
* ``info.vlen``: 0
372+
* ``info.vlen``: linkage information (BTF_FUNC_STATIC, BTF_FUNC_GLOBAL
373+
or BTF_FUNC_EXTERN)
373374
* ``type``: a BTF_KIND_FUNC_PROTO type
374375

375376
No additional type data follow ``btf_type``.
@@ -380,6 +381,9 @@ type. The BTF_KIND_FUNC may in turn be referenced by a func_info in the
380381
:ref:`BTF_Ext_Section` (ELF) or in the arguments to :ref:`BPF_Prog_Load`
381382
(ABI).
382383

384+
Currently, only linkage values of BTF_FUNC_STATIC and BTF_FUNC_GLOBAL are
385+
supported in the kernel.
386+
383387
2.2.13 BTF_KIND_FUNC_PROTO
384388
~~~~~~~~~~~~~~~~~~~~~~~~~~
385389

0 commit comments

Comments
 (0)