Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

swapping out linked shared library at runtime

Tags:

linux

shared

Assume I have a process X and then it has loaded some shared library Y into its address space. I then manage to swap this library Y with a different version Yprime, what would be the effect on the process?

like image 204
earlence Avatar asked Jul 22 '26 17:07

earlence


1 Answers

No effect. The loader holds the library open until the process ends (or until the library is unloaded via dlclose(3)), which means that it keeps using the same (now deleted) library since its blocks still exist on disk.

like image 135
Ignacio Vazquez-Abrams Avatar answered Jul 25 '26 00:07

Ignacio Vazquez-Abrams



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!