libbpf: Remove the duplicate checking of function storage
Subsystems (4)
PATCH v2 1/1 libbpf: Remove the duplicate checking of function storage
After the commit eac7d84519a3 ("tools: libbpf: don't return '.text' as a program for multi-function programs"), bpf_program__next() in bpf_object__for_each_program skips the function storage such as .text, so eliminate the duplicate checking.
--- tools/lib/bpf/libbpf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/libbpf.c +1 -1
@@ -2336,7 +2336,7 @@ int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,bpf_program__set_expected_attach_type (prog, expected_attach_type); -if (!bpf_program__is_function_storage (prog, obj) && !first_prog) +if (!first_prog) first_prog = prog; }
Signature · 1 line
2.17.1
Quoted 7 lines · Taeung Song
After the commit
eac7d84519a3("tools: libbpf: don't return '.text' as a program for multi-function programs"),bpf_program__next()inbpf_object__for_each_programskips the function storage such as .text, so eliminate the duplicate checking.Cc Jakub Kicinski <[email protected]>Signed-off-by Taeung Song <[email protected]>
Alexei Starovoitov
AppliedQuoted 10 lines · Jakub Kicinski
Quoted 7 lines · Taeung Song
After the commit
eac7d84519a3("tools: libbpf: don't return '.text' as a program for multi-function programs"),bpf_program__next()inbpf_object__for_each_programskips the function storage such as .text, so eliminate the duplicate checking.Cc Jakub Kicinski <[email protected]>Signed-off-by Taeung Song <[email protected]>Acked-by Jakub Kicinski <[email protected]>
Applied, Thanks