Vendor deprecated btf_ext APIs and structs
authorDave Marchevsky <davemarchevsky@fb.com>
Wed, 29 Dec 2021 23:48:39 +0000 (18:48 -0500)
committeryonghong-song <ys114321@gmail.com>
Wed, 5 Jan 2022 03:29:28 +0000 (19:29 -0800)
commit9fce5059307c2f7ea42c2a7e4fee4c1bd82e0b7e
tree474bbbf05fd39766998efa23f8a34b0a0f3b5cee
parentca1d3fd07a8483270041ef2899ed72fa28473811
Vendor deprecated btf_ext APIs and structs

Some btf_ext-related APIs in libbpf are being deprecated because they
make incorrect assumptions. They're being used only by bcc currently, so
vendor them before they get deleted.

After / as part of #3660, may need to revisit the incorrect assumptions
being made here.

The functions and structs were ripped directly from libbpf with minimal
changes:
  * Change void* arithmetic to uint8_t
  * __u32 -> uint32_t and similar
  * Add a wrapping namespace
  * `rec_size` functions were not needed - just grab the rec_size
directly since type is no longer opaque to bcc
src/cc/bcc_btf.cc
src/cc/bcc_btf.h