/* A shared object that is not a redefinition module: it loads, and it has no * flan_reload_install for the agent to find. * * The destructor is the observation. The agent used to drop the handle on the * floor when it refused a module like this one — the mapping stayed, the * reference count went up, and the one handle that could have brought it down * was gone. Now the module is closed, because nothing was installed from it * and so nothing can point into it, and this line appears while the program is * still running. Waiting for the program to exit would prove nothing: the * loader runs every destructor at exit whether anything was closed or not. */ #include __attribute__((destructor)) static void unloaded(void) { printf("unloaded\n"); fflush(stdout); }