dlopen(3) many threads global variable

"Hicham Mouline" <[email protected]>
Newsgroups org.kernel.vger.linux-c-programming
Message-ID <[email protected]>
Hello,

There is a .so shared dynamic library the main source file of which contains 
a global variable.

In my main funtion, I call dlopen() on the same .so file from 16 different 
threads. I do nothing to ensure the call is not done at the same time.

Very roughly speaking (and please can you provide precision if possible), 
the executable code of the .so file is loaded into the main process virtual 
memory after the dlopen has succeeded. (Note the main binary is not linked 
against the .so file)

Will there be 16 copies of the executable code from the .so file in the 
process?

IN particular, will there be 16 copies of the global variable?

Regards,
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.