aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/progs/linked_funcs1.c
AgeCommit message (Collapse)AuthorFilesLines
2021-04-23selftests/bpf: Add function linking selftestAndrii Nakryiko1-0/+73
Add selftest validating various aspects of statically linking functions: - no conflicts and correct resolution for name-conflicting static funcs; - correct resolution of extern functions; - correct handling of weak functions, both resolution itself and libbpf's handling of unused weak function that "lost" (it leaves gaps in code with no ELF symbols); - correct handling of hidden visibility to turn global function into "static" for the purpose of BPF verification. Signed-off-by: Andrii Nakryiko <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Yonghong Song <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]