Re: dlopen

New Message Reply Date view Thread view Subject view Author view

SWAPNIL H SHAH (swapnil++at++teil.soft.net)
Tue, 11 Feb 1997 13:07:26 -0530 (IST)


Hi,

Thanks Glenn, for solving my problem.

I tried only 2nd method and it really worked...whoops.... :)

thanks you very much to all who spend time for me
-swapnil

> SWAPNIL H SHAH wrote:
> >
> > Hello everybody,
> >
> > if i have global variable called "g" in DSO file "dso1.so" and
> > i have one mroe DSO file called "dso2.so"
> >
> > is it possible to access variable "g" from "dso2.so" by defining it extern?
>
> Somebody correct me if I'm wrong, but:
> Two things:
> 1) use sgidladd() instead of dlopen(). This way all the symbols are
> made available in the name space and there's no need for
> dlsym() (so you don't need the library pointer);
> 2) To access a symbol in libdso1.so from libdso2.so, you need to "link"
> with libdso1.so when compiling libdso2.so; that is, do a
> "-ldso1" when creating the library libdso2.so. This doesn't
> actually link in the code, but allows any cross-references to be
> resolved. If you don't do this you'll get a runtime linker (rld)
> error when you try to access "g", even is it's dso is loaded.
> Glenn.
>
> --------------------------------------------------------------------
> Glenn Waldron - ANSER Leading Edge Technologies PCS: 703.598.7835
> email: gwaldron++at++peril.com voice mail: 703.416.8462
>

************************************************************
        E-Mail : swapnil++at++teil.soft.net
        WWW : http://www.teil.soft.net/~swapnil/
        Call me: 91-080-8452016 ext-218
************************************************************
=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:54:37 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.