Exporting symbols for dlopen from shared library?

H.J. Lu hjl@lucon.org
Thu Apr 30 00:23:00 GMT 1998


> 
> 
> 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.



More information about the Gcc mailing list