<div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">Hello </span>llvm<span style="color:rgb(0,0,0);font-family:arial,helvetica,sans-serif">-dev,</span><br></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font color="#000000" face="arial, helvetica, sans-serif"><span style="caret-color: rgb(0, 0, 0);">I'm working on a project that is looking at using BPF as the underlying instruction set for running programs in a protected environment.  We have a working prototype but have run into a few issues and missing functionality.  It appears these might be due to BPF development being focused on usage in the Linux kernel.  Our requirements are broader (rodata, shared objects with dynamic linking) and we hope to compile multiple languages down to BPF (C/C++, Rust, ...).  Here is an example of the issues or missing functionality we've run into so far:</span></font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">- 512 byte stack size limitation</font></div><div><font face="arial, helvetica, sans-serif">- No support for returning structures from functions</font></div><div><font face="arial, helvetica, sans-serif">- No support in lld for BPF shared objects (though we have made local changes that adds this support that we'd be happy to upstream)</font></div><div><font face="arial, helvetica, sans-serif">- llc reporting unsupported relocations when C using rodata in a typical way</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Are there any efforts underway to broaden the scope of BPF beyond the Linux kernel requirements and what kind of other issues or known lack of support may we encounter?</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Thanks,</font></div><div><font face="arial, helvetica, sans-serif">Jack</font></div><div><br></div></div>