[PATCH v2 pahole 0/3] add libbpf dependency as a submodule

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is my initial take on how to start using libbpf from pahole with the intent
to reuse as much functionality from libbpf as possible. This is also necessary
to do BTF deduplication, because btf__dedup() is implemented only as part of
libbpf.

Patch #2 adds submodule and corresponding cmake changes to build against libbpf.
Patch #3 removes pahole's btf.h copy and references one from libbpf to test
that libbpf is usable.

If this approach will be deemed good, I'll continue refactoring of btf_encoder
and btf_loader to utilize libbpf more fully and also use btf__dedup.

v1->v2:
- add detection of reallocarray, normally done by libbpf's Makefile

Andrii Nakryiko (3):
  pahole: add build dir, config.h to .gitignore
  pahole: add libbpf as submodule under lib/bpf
  pahole: use btf.h directly from libbpf

 .gitignore     |   2 +
 .gitmodules    |   3 ++
 CMakeLists.txt |  49 ++++++++++++++++-
 btf.h          | 140 -------------------------------------------------
 btf_encoder.c  |   2 +-
 btf_loader.c   |   2 +-
 lib/bpf        |   1 +
 libbtf.c       |   2 +-
 8 files changed, 56 insertions(+), 145 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 .gitmodules
 delete mode 100644 btf.h
 create mode 160000 lib/bpf

-- 
2.17.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux