This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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