[PATCH bpf-next 8/9] libbpf: implement enum value-based CO-RE relocations

2020-08-18 Thread Andrii Nakryiko
Implement two relocations of a new enumerator value-based CO-RE relocation kind: ENUMVAL_EXISTS and ENUMVAL_VALUE. First, ENUMVAL_EXISTS, allows to detect the presence of a named enumerator value in the target (kernel) BTF. This is useful to do BPF helper/map/program type support detection from BP

[RFC PATCH bpf-next 8/9] libbpf: implement enum value-based CO-RE relocations

2020-08-04 Thread Andrii Nakryiko
Implement two relocations of a new enumerator value-based CO-RE relocation kind: ENUMVAL_EXISTS and ENUMVAL_VALUE. First, ENUMVAL_EXISTS, allows to detect the presence of a named enumerator value in the target (kernel) BTF. This is useful to do BPF helper/map/program type support detection from BP