diff options
author | Andrii Nakryiko <andriin@fb.com> | 2020-09-03 13:35:30 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-03 17:14:39 -0700 |
commit | c112239272c6bacf7fcd0a0dc71999ad8eb1c55c (patch) | |
tree | a9c9783cbd84642ce17b548c58bf1416385fa7d6 /tools/lib/find_bit.c | |
parent | 0201c575831171292489f14a8b6f79f98936b4d1 (diff) |
libbpf: Parse multi-function sections into multiple BPF programs
Teach libbpf how to parse code sections into potentially multiple bpf_program
instances, based on ELF FUNC symbols. Each BPF program will keep track of its
position within containing ELF section for translating section instruction
offsets into program instruction offsets: regardless of BPF program's location
in ELF section, it's first instruction is always at local instruction offset
0, so when libbpf is working with relocations (which use section-based
instruction offsets) this is critical to make proper translations.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20200903203542.15944-3-andriin@fb.com
Diffstat (limited to 'tools/lib/find_bit.c')
0 files changed, 0 insertions, 0 deletions