3 ms·
Pardon my ignorance, is clang needed to build eBPF programs like it says in the article?
by ranting-moth 3y ago
Pardon my ignorance, is clang needed to build eBPF programs like it says in the article?
- unmole 3y agoOne could always write the eBPF assembly by hand. I ended up doing that a few years ago when clang didn't yet have eBPF support. Would not recommend.
- tptacek 3y agoIt's a C compiler with an eBPF backend, but if you wanted to compile from a different language, or had a different C compiler with an eBPF backend (like GCC), you could do that. `libpcap` contains a surprisingly sophisticated compiler for filter expressions (to cBPF, which is JIT'd to eBPF; compiling to cBPF is in some ways more impressive given its limitations).