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
..
2018-10-26 16:26:32 -07:00
2019-03-11 16:13:04 -03:00
2019-04-09 17:05:47 -07:00
2019-03-20 16:42:10 -03:00
2018-12-07 14:15:00 +08:00
2019-01-08 16:29:52 -07:00
2019-01-22 10:23:18 +01:00
2018-12-28 16:33:08 -03:00
2018-11-11 12:58:27 -08:00
2019-02-11 09:25:01 +01:00
2019-04-09 17:05:47 -07:00
2019-03-06 13:00:16 -07:00
2018-11-27 12:53:44 +01:00
2019-04-09 17:05:47 -07:00
2019-01-21 11:07:04 +01:00
2019-03-21 12:02:19 +01:00
2018-10-03 11:19:52 +01:00
2019-03-22 22:51:21 +01:00
2019-03-19 16:51:16 +01:00
2018-09-04 17:00:37 +01:00
2019-04-09 17:05:47 -07:00
2019-01-04 12:54:49 -03:00
2018-10-18 19:44:39 +02:00
2018-12-19 18:23:49 -05:00
2019-03-05 21:07:20 -08:00
2019-01-08 16:38:36 -07:00