This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Exporting symbols for dlopen from shared library?
- To: maratb at cs dot berkeley dot edu (Marat Boshernitsan)
- Subject: Re: Exporting symbols for dlopen from shared library?
- From: hjl at lucon dot org (H.J. Lu)
- Date: Thu, 30 Apr 1998 00:22:14 -0700 (PDT)
- Cc: egcs at cygnus dot com
>
>
> 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.