Joe Stringer
b915ebe6d9
bpf, selftest: test global data/bss/rodata sections
Add tests for libbpf relocation of static variable references
into the .data, .rodata and .bss sections of the ELF, also add
read-only test for .rodata. All passing:
# ./test_progs
[...]
test_global_data:PASS:load program 0 nsec
test_global_data:PASS:pass global data run 925 nsec
test_global_data_number:PASS:relocate .bss reference 925 nsec
test_global_data_number:PASS:relocate .data reference 925 nsec
test_global_data_number:PASS:relocate .rodata reference 925 nsec
test_global_data_number:PASS:relocate .bss reference 925 nsec
test_global_data_number:PASS:relocate .data reference 925 nsec
test_global_data_number:PASS:relocate .rodata reference 925 nsec
test_global_data_number:PASS:relocate .bss reference 925 nsec
test_global_data_number:PASS:relocate .bss reference 925 nsec
test_global_data_number:PASS:relocate .rodata reference 925 nsec
test_global_data_number:PASS:relocate .rodata reference 925 nsec
test_global_data_number:PASS:relocate .rodata reference 925 nsec
test_global_data_string:PASS:relocate .rodata reference 925 nsec
test_global_data_string:PASS:relocate .data reference 925 nsec
test_global_data_string:PASS:relocate .bss reference 925 nsec
test_global_data_string:PASS:relocate .data reference 925 nsec
test_global_data_string:PASS:relocate .bss reference 925 nsec
test_global_data_struct:PASS:relocate .rodata reference 925 nsec
test_global_data_struct:PASS:relocate .bss reference 925 nsec
test_global_data_struct:PASS:relocate .rodata reference 925 nsec
test_global_data_struct:PASS:relocate .data reference 925 nsec
test_global_data_rdonly:PASS:test .rodata read-only map 925 nsec
[...]
Summary: 229 PASSED, 0 FAILED
Note map helper signatures have been changed to avoid warnings
when passing in const data.
Joint work with Daniel Borkmann.
Signed-off-by: Joe Stringer <joe@wand.net.nz>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Acked-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-09 17:05:47 -07:00
..
2019-03-02 11:10:40 -08:00
2019-04-02 23:17:18 +02:00
2019-04-04 01:27:38 +02:00
2019-03-02 11:10:40 -08:00
2019-04-04 16:43:47 +02:00
2019-04-09 17:05:47 -07:00
2019-03-02 11:10:40 -08:00
2019-03-12 21:55:54 +01:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-07 10:46:25 +01:00
2019-03-12 21:55:54 +01:00
2019-03-26 12:47:41 -07:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00
2019-03-02 11:10:40 -08:00