I have 2 application lets say A1 ,A2 shared one shared object(lets say lib1) which loaded in application at runtime. A1 load lib1 using dlopen successfully. Now A2 wants to load library. Can A2?(as lib1 loaded in A1 address space). What if A1 load using RTLD_LOCAL. Can A2 load lib?
Asked
Active
Viewed 340 times
1
1 Answers
3
Yes, of course. From the Wikipedia article on libraries:
A shared library or shared object is a file that is intended to be shared by executable files and further shared objects files
In other words, the whole reason they're called "shared" is because more than one executable is using them.
From the docs for RTLD_LOCAL
:
Symbols defined in this library are not made available to resolve references in subsequently loaded libraries.
The RTLD_LOCAL
flag to dlopen()
simply indicates that when A1
loads lib1
, if it defines, say, a function f1()
, and then A1
loads lib2
, it can't use the f1()
from lib1
, because that was loaded local.

ckhan
- 4,132
libc
. – Mat May 09 '12 at 05:35