[PATCH openEuler-22.09 311/379] libbpf: Reduce reliance of attach_fns on sec_def internals