clang: loader: Allow user to override kernel version (#1895)
BCC currently requires exactly matching headers. Sometimes this is quite
inconvenient especially if the kernel version is only very slightly
different such as updates in a stable kernel. This patch gives the user
the flexibility to override the the LINUX_VERSION_CODE provided in the
linux kernel headers, so that the eBPF program may load. We also print a
message when this is done, so that the user is warned about the override
happening and that results may be unpredictable.
Also updated the docs.
Signed-off-by: Joel Fernandes <joel@joelfernandes.org>
Showing
src/cc/export/helpers.h
100644 → 100755
src/cc/frontends/clang/loader.cc
100644 → 100755