Is it possible to write an eBPF program, that can dynamically call an external library? I.e. assume that this specific library is present on the host that runs the eBPF code.
Right now I don't care if the program is passing verification, but rather if it is possible to express this in the bytecode. It should be assumed that the external function is not embedded in the ELF binary.
No, this is not possible at the moment.
Once loaded and attached, eBPF programs can call:
BPF_PROG_TYPE_EXT
It cannot call functions from user space libraries.