Re: [RFC PATCH v4 06/29] bpf tools: Open eBPF object file and do basic validation

2015-05-27 Thread Alexei Starovoitov
On Wed, May 27, 2015 at 05:19:41AM +, Wang Nan wrote: > This patch defines basic interface of libbpf. 'struct bpf_object' will > be the handler of each object file. Its internal structure is hide to > user. eBPF object files are compiled by LLVM as ELF format. In this > patch, libelf is used to

[RFC PATCH v4 06/29] bpf tools: Open eBPF object file and do basic validation

2015-05-26 Thread Wang Nan
This patch defines basic interface of libbpf. 'struct bpf_object' will be the handler of each object file. Its internal structure is hide to user. eBPF object files are compiled by LLVM as ELF format. In this patch, libelf is used to open those files, read EHDR and do basic validation according to