This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Exporting symbols for dlopen from shared library?


> 
> 
> Yes I have.  As I understand it, RTLD_GLOBAL will make all symbols from
> the library available to subsequent dlopen calls.  This is, actually,
> something I don't want to do with bar.so, since foo.so may load bar1.so and
> bar2.so and I don't want them to conflict.
> 
> It seems that what I need is that foo.so be loaded with RTLD_GLOBAL into
> Tcl/Tk or Java interpreter, but I have no control over their source
> code.  Is there some other way to achieve the same effect?
> 

Nothing I am aware of. It is the program which loads foo.so has the
final say what to do about foo.so. Otherwise, it may cause many
more problems.

Basically, exporting symbols in foo.so or not has to be decided at
the time when foo.so is loaded into memory.

However, have you tried

# gcc -shared -o bar.so ...... foo.so



H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]