get rid of version checks
authorAlexei Starovoitov <ast@fb.com>
Thu, 31 Mar 2016 20:37:04 +0000 (13:37 -0700)
committerAlexei Starovoitov <ast@fb.com>
Thu, 31 Mar 2016 20:37:04 +0000 (13:37 -0700)
commitf09b5b8acdd5123ba4101a80c87eaa4b8a687c4c
tree50ddb67222b4da9c376a00aff8d54c4e55802ef4
parent63a880061692cdf37e819ef8127686286b12b599
get rid of version checks

version checks don't work at all on kernels with backported bpf bits
they also fail when /usr/include/linux/bpf.h doesn't match loaded
kernel.
Fix these issues by embedding bpf.h into libbcc.so and force load it
in clang, so we can remove all version checks and rely on verifier
complaining on unknown function call.
Later patch can make verifier errors less cryptic by converting
'unknown call 12' to strings.

while at it update bpf.h to the latest.

Signed-off-by: Alexei Starovoitov <ast@fb.com>
src/cc/compat/linux/bpf.h
src/cc/compat/linux/virtual_bpf.h [new file with mode: 0644]
src/cc/export/helpers.h
src/cc/exported_files.cc
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/loader.cc