If a dynamic library has a global variable, the dynamic library used by program A, and program B also uses this dynamic library, is the global variable in program A and b a? That is, when using dynamic libraries between processes, do you share global variables? The answer is: is a, shared, but write-time copy, to the programmer's feeling is: do not share.
Refer to the links below for details:
http://blog.csdn.net/yuyin86/article/details/10239479
Http://www.cnblogs.com/lovevivi/archive/2013/01/10/2854584.html
http://markzhang.cn/blog/2016/01/12/global-variable-in-shared-lib/
Http://unixresources.net/linux/clf/program/archive/00/00/46/80/468069.html
Http://www.ibm.com/developerworks/cn/linux/l-cn-sdlstatic/index.html
Http://www.ibm.com/developerworks/cn/linux/l-dynamic-libraries/index.html
http://www.ibm.com/developerworks/cn/linux/l-dynlink/
http://tgmlyj.blog.163.com/blog/static/59415229200921892232555/
Knowledge of Linux dynamic libraries