On Friday, May 1, 2026, Thiago Macieira  wrote:


Because we *ARE* talking about cross-DLL/shared library calls. Intra-library
ones can't be intercepted because they may have resolved using PC-relative
addressing and wouldn't go through an interceptable point (the PLT or GOT).
 




Yeah I'm pretty much just suggesting this for target functions that reside in DLL files and SO files.

Doesn't really makes sense for functions inside the process's main executable file, because as Jonathan already demonstrated, a template lambda works fine for that.

The Standard doesn't necessarily have to describe DLL's or SO's in order to provide interceptor functions . . . in fact it could just talk about a separately compiled translation unit. And a library is essentially just a few separate translation units squished into one file (actually that's exactly what a '.a' file is on Linux, you can rip the object files out with 'ar -x').

I emailed Lorand earlier today hoping she'd chime back in with how she'd use this with Haskell.