Talk:TUT:Writing a Dynamically Loadable Object

From Net-SNMP Wiki
Jump to: navigation, search

How is loading the shared object multiple times problematic? As long as non-static symbols of the are not exported by default, both objects should live in their private little happy place. Actually, I doubt that setting RTLD_GLOBAL or similar would be a problem, because actually not symbol resolution takes place.. octo 21:45, 3 March 2009 (UTC)

The problem is that dlopening the same module a second time will return a reference to the same object as the first dlopen, so both copies will work with the same static data. magfr 2009-03-04T22:07 UTC

  • Oh, that's right.. I should have checked dlopen(3) first.. octo 09:53, 5 March 2009 (UTC)