Symbol versioning in dlopen modules

Zoltan Hidvegi hzoli@austin.ibm.com
Mon Jun 3 15:05:00 GMT 2002


H . J . Lu wrote:
> You can't reference a versioned symbol without telling ld where that
> versioned symbol comes from. Ld will drop the version in that case
> 
> # objdump --dynamic-sym lib3.so | grep message
> 00000000      D  *UND*  00000000              message

So this means that there is no way a dlopen loaded module can refer to
an undefined versioned symbol to be resolved from main?

> > There are other things which seem to be real bugs.  If I remove the
> > message definitions from lib1 and lib2, they will not load because the
> > dynamic loader does not see the version of message defined in main.
> > It looks like the @@ versions defined in main are not visible in the
> > loaded modules.
> 
> Add -rdynamic to gcc.

I did, look at my Makefile.  And note that in my example there is a
function main_export that is used by the loaded module and it works,
only message which is defined via .symver does not work.

Zoli



More information about the Binutils mailing list