Loading executable or executing a library
问题 There is a large number of questions on SO about how to execute a library or dynamically load an executable. As far as I can tell, all the answers come down to: compile your executable as position-independent code and load it with dlopen . This worked great --- and still works great on macOS --- until a recent change in glibc, which explicitly disabled dlopen ing PIEs. This change is now in the current version of glibc (2.30) on ArchLinux, for example, and trying to dlopen a position