Linux equivalent of DllMain

前端 未结 3 361
醉梦人生
醉梦人生 2020-12-30 23:18

In *nix .so libraries, is there an entry point that\'s invoked by the system when the library is loaded and unloaded?

On a more practical note: if the .so was writte

3条回答
  •  旧时难觅i
    2020-12-30 23:40

    The technique used is a little different, but the construction/destruction of global objects is more or less built into the dynamic loader. (Even under Windows, there's no need to go through DllMain. The global objects will be constructed/destructed correctly anyway.)

提交回复
热议问题