diff options
-rw-r--r-- | Android.bp | 4 | ||||
-rw-r--r-- | TEST_MAPPING | 12 | ||||
-rw-r--r-- | android/btfloader.cpp | 2 | ||||
-rw-r--r-- | src/skel_internal.h | 4 |
4 files changed, 17 insertions, 5 deletions
@@ -45,10 +45,12 @@ genrule { "bpf/bpf_helpers.h", "bpf/bpf_tracing.h", "bpf/btf.h", + "bpf/hashmap.h", "bpf/libbpf_common.h", "bpf/libbpf.h", "bpf/libbpf_legacy.h", "bpf/libbpf_version.h", + "bpf/nlattr.h", "bpf/skel_internal.h", "bpf/xsk.h", ], @@ -82,6 +84,8 @@ cc_library_static { "libz", ], visibility: [ + "//external/bpftool", + "//external/bcc/libbpf-tools", "//external/dwarves", "//external/stg", ], diff --git a/TEST_MAPPING b/TEST_MAPPING new file mode 100644 index 0000000..b6a940b --- /dev/null +++ b/TEST_MAPPING @@ -0,0 +1,12 @@ +{ + "presubmit": [ + { + "name": "libbpf_load_test" + } + ], + "hwasan-postsubmit": [ + { + "name": "libbpf_load_test" + } + ] +} diff --git a/android/btfloader.cpp b/android/btfloader.cpp index 24df4d6..cd82262 100644 --- a/android/btfloader.cpp +++ b/android/btfloader.cpp @@ -72,8 +72,8 @@ int main(int argc, char **argv) { bt->info = (BTF_INFO_KIND(bt->info)) << 24; } } + if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF; } - if (btf__load_into_kernel(btf)) return kERROR_LOAD_BTF; btfFd = btf__fd(btf); if (sendBtfFd(socketFd, btf__fd(btf))) return kERROR_SEND_BTF_FD; diff --git a/src/skel_internal.h b/src/skel_internal.h index 2761970..dcd3336 100644 --- a/src/skel_internal.h +++ b/src/skel_internal.h @@ -57,9 +57,6 @@ struct bpf_load_and_run_opts { const char *errstr; }; -// ANDROID: Since the glibc stub we have does not know about __NR_bpf, this -// fails to compile. For now, just do not provide this functionality. -#if 0 static inline int skel_sys_bpf(enum bpf_cmd cmd, union bpf_attr *attr, unsigned int size) { @@ -199,6 +196,5 @@ out: close(prog_fd); return err; } -#endif #endif |