I am trying to modify this shared library (with .so) extension on Linux. I am inserting some printf statement and fprintf statement to debug, and it has no effect. I removed the .so file and realized that the the program still runs fine. Does it mean that the program is loaded into memory?? (But I’m sure only the program I’m testing for uses that .so file though)
How do I get it to unload so I can make sure my program is loading the modified one?
No, shared libraries are not cached in memory. If you have deleted the
.sofile and your program still runs, then either:.soof the same name from a different location, or.soIf the
.sois supposed to be loaded at program startup, then you can uselddto find out where your OS thinks the.soactually is.If the
.sois loaded dynamically at runtime, then perhapsstracewill be able to help pinpoint what is happening.