@whitequark @eevee @rail my last job involved this as well, and my solution involved building a custom dynamic libc fork designed for the purpose

it wasn't actually hard to do, but the fact that nobody had done it before was pretty mind-boggling

still isn't in upstream because mailing-list-based development is an absolute joke