• N
    libbpf: make bpf_object__open default to UNSPEC · 47ae7e3d
    Nikita V. Shirokov 提交于
    currently by default libbpf's bpf_object__open requires
    bpf's program to specify  version in a code because of two things:
    1) default prog type is set to KPROBE
    2) KPROBE requires (in kernel/bpf/syscall.c) version to be specified
    
    in this patch i'm changing default prog type to UNSPEC and also changing
    requirments for version's section to be present in object file.
    now it would reflect what we have today in kernel
    (only KPROBE prog type requires for version to be explicitly set).
    
    v1 -> v2:
     - RFC tag has been dropped
    Signed-off-by: NNikita V. Shirokov <tehnerd@tehnerd.com>
    Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
    47ae7e3d
libbpf.c 65.8 KB