How to do runtime binding based on CPU capabilities on linux
问题 Is it possible to have a linux library (e.g. "libloader.so") load another library to resolve any external symbols? I've got a whole bunch of code that gets conditionally compiled for the SIMD level to be supported ( SSE2, AVX, AVX2 ). This works fine if the build platform is the same as the runtime platform. But it hinders reuse across different processor generations. One thought is to have executable which calls function link to libloader.so that does not directly implement function . Rather