summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/custom_sec_handlers.c
AgeCommit message (Collapse)Author
2022-03-05selftests/bpf: Add custom SEC() handling selftestAndrii Nakryiko
Add a selftest validating various aspects of libbpf's handling of custom SEC() handlers. It also demonstrates how libraries can ensure very early callbacks registration and unregistration using __attribute__((constructor))/__attribute__((destructor)) functions. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Alan Maguire <alan.maguire@oracle.com> Reviewed-by: Alan Maguire <alan.maguire@oracle.com> Link: https://lore.kernel.org/bpf/20220305010129.1549719-4-andrii@kernel.org