diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-12-17 21:25:50 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-12-17 22:16:35 -0800 |
commit | 5dc7a8b2114479fd945956ece9875f747a996a8e (patch) | |
tree | 1fcb389abfbd012fe1156511a48152f20248b35f /tools/testing/selftests/bpf/prog_tests/mmap.c | |
parent | 4a3d6c6a6e4d652808729e7a2a8c3774a5a5c814 (diff) | |
download | linux-5dc7a8b2114479fd945956ece9875f747a996a8e.tar.bz2 |
bpftool, selftests/bpf: Embed object file inside skeleton
Embed contents of BPF object file used for BPF skeleton generation inside
skeleton itself. This allows to keep BPF object file and its skeleton in sync
at all times, and simpifies skeleton instantiation.
Also switch existing selftests to not require BPF_EMBED_OBJ anymore.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20191218052552.2915188-2-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/mmap.c')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/mmap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/prog_tests/mmap.c b/tools/testing/selftests/bpf/prog_tests/mmap.c index 95a44d37ccea..16a814eb4d64 100644 --- a/tools/testing/selftests/bpf/prog_tests/mmap.c +++ b/tools/testing/selftests/bpf/prog_tests/mmap.c @@ -13,8 +13,6 @@ static size_t roundup_page(size_t sz) return (sz + page_size - 1) / page_size * page_size; } -BPF_EMBED_OBJ(test_mmap, "test_mmap.o"); - void test_mmap(void) { const size_t bss_sz = roundup_page(sizeof(struct test_mmap__bss)); @@ -30,7 +28,7 @@ void test_mmap(void) __u64 val = 0; - skel = test_mmap__open_and_load(&test_mmap_embed); + skel = test_mmap__open_and_load(); if (CHECK(!skel, "skel_open_and_load", "skeleton open/load failed\n")) return; |