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