Skip to content

Commit

Permalink
libbpf: Generalize BTF and BTF.ext type ID and strings iteration
Browse files Browse the repository at this point in the history
Extract and generalize the logic to iterate BTF type ID and string offset
fields within BTF types and .BTF.ext data. Expose this internally in libbpf
for re-use by bpf_linker.

Additionally, complete strings deduplication handling for BTF.ext (e.g., CO-RE
access strings), which was previously missing. There previously was no
case of deduplicating .BTF.ext data, but bpf_linker is going to use it.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20210318194036.3521577-3-andrii@kernel.org
  • Loading branch information
Andrii Nakryiko authored and Alexei Starovoitov committed Mar 18, 2021
1 parent e14ef4b commit f36e99a
Show file tree
Hide file tree
Showing 2 changed files with 228 additions and 172 deletions.
Loading

0 comments on commit f36e99a

Please sign in to comment.