... force the compiler to off-load the one in memory and load the new one ...

No, can't be done. Just restart the process using the library. By the way, this is really a Linux programming or even tech question.