[PATCH openEuler-22.09 v3 292/391] libbpf: Reduce reliance of attach_fns on sec_def internals