]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: Add global variables linking selftest
authorAndrii Nakryiko <andrii@kernel.org>
Fri, 23 Apr 2021 18:13:46 +0000 (11:13 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 23 Apr 2021 21:05:27 +0000 (14:05 -0700)
commitb2f4949a77990eab9ec431d13f0a3c6144836527
treef010365a15637827e8180abb3694c08c77ce335a
parentec01a22ca5f2b9adc2bee1ae1828b10ab89cbc98
selftests/bpf: Add global variables linking selftest

Add selftest validating various aspects of statically linking global
variables:
  - correct resolution of extern variables across .bss, .data, and .rodata
    sections;
  - correct handling of weak definitions;
  - correct de-duplication of repeating special externs (.kconfig, .ksyms).

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210423181348.1801389-17-andrii@kernel.org
tools/testing/selftests/bpf/Makefile
tools/testing/selftests/bpf/prog_tests/linked_vars.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/linked_vars1.c [new file with mode: 0644]
tools/testing/selftests/bpf/progs/linked_vars2.c [new file with mode: 0644]