This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Symbol versioning in dlopen modules
- From: Zoltan Hidvegi <hzoli at austin dot ibm dot com>
- To: hjl at lucon dot org (H . J . Lu)
- Cc: binutils at sources dot redhat dot com
- Date: Mon, 3 Jun 2002 17:05:04 -0500 (CDT)
- Subject: Re: Symbol versioning in dlopen modules
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