Lines Matching +full:kconfig +full:- +full:ext

1 .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
4 bpftool-gen
6 -------------------------------------------------------------------------------
7 tool for BPF code-generation
8 -------------------------------------------------------------------------------
19 *OPTIONS* := { |COMMON_OPTIONS| | { **-L** | **--use-loader** } }
40 user-space object files, but in addition to combining data
41 and instruction sections, .BTF and .BTF.ext (if present in
74 user in pre-allocated fields in skeleton struct. For BPF
77 in per-program link field. All such set up links will be
84 global variables of all supported kinds: mutable, read-only,
85 as well as extern ones. This interface allows to pre-setup
87 verified by kernel. For non-read-only variables, the same
94 object file are matching 1-to-1 and always stay in sync.
95 Generated code is dual-licensed under LGPL-2.1 and
96 BSD-2-Clause licenses.
113 - **example__open** and **example__open_opts**.
119 - **example__load**.
124 - **example__open_and_load** combines **example__open** and
128 - **example__attach** and **example__detach**
131 programs of types supported by libbpf for auto-attachment
132 will be auto-attached and their corresponding BPF links
139 - **example__destroy**
146 *.bss*, *.rodata*, and *.kconfig* structs/data sections.
149 Afterwards, if target kernel supports memory-mapped BPF
151 (non-read-only) data from userspace, with same simplicity
170 - **example__open(bpf_object\*)**
174 - **example__destroy()**
181 more, given eBPF objects CO-RE relocations may be satisfied.
185 BTF files to be able to calculate CO-RE relocations.
193 together with an eBPF CO-RE based application, turning the
205 -L, --use-loader
273 * and testmod_map->data.
291 **$ clang --target=bpf -g example1.bpf.c -o example1.bpf.o**
293 **$ clang --target=bpf -g example2.bpf.c -o example2.bpf.o**
295 **$ clang --target=bpf -g example3.bpf.c -o example3.bpf.o**
307 /* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
382 skel->rodata->param1 = 128;
385 skel->struct_ops.testmod_map->data = 13;
392 printf("test_2_result: %d\n", skel->bss->test_2_result);
399 printf("my_map name: %s\n", bpf_map__name(skel->maps.my_map));
401 bpf_program__fd(skel->progs.handle_sys_enter));
403 /* detach and re-attach sys_exit program */
404 bpf_link__destroy(skel->links.handle_sys_exit);
405 skel->links.handle_sys_exit =
406 bpf_program__attach(skel->progs.handle_sys_exit);
409 skel->bss->handle_sys_enter_my_static_var);
425 This is a stripped-out version of skeleton generated for above example code.
428 ------------
430 **$ bpftool btf dump file 5.4.0-example.btf format raw**
461 **$ bpftool gen min_core_btf 5.4.0-example.btf 5.4.0-smaller.btf one.bpf.o**
463 **$ bpftool btf dump file 5.4.0-smaller.btf format raw**
480 Now, the "5.4.0-smaller.btf" file may be used by libbpf as an external BTF file
481 when loading the "one.bpf.o" object into the "5.4.0-example" kernel. Note that
487 LIBBPF_OPTS(bpf_object_open_opts, opts, .btf_custom_path = "5.4.0-smaller.btf");