Solution to --> Re: dlopen() bug on Linux/Alpha

Dan Weeks danimal@blueskystudios.com
Sat Jan 10 20:11:00 GMT 1998


Stefan Traby writes:
 > 
 > > We tried that one too.  We got the same results.  I beleive that
 > > "-export-dynamic" allows other dynamic libraries to see the symbols in 
 > > the one you are loading.  But that is just my understanding of it.
 > > 
 > > -danimal
 > 
 > Try to link the main (!) program with "-export-dynamic -shared"
 > 
 > > Stefan Traby writes:
 > >  > Hi Dan !
 > >  > 
 > >  > > Let me make a correction to this.  When the dlopen call is used it
 > >  > > does _not_ kill the executable, it only returns a null file handle.
 > >  > > When we use the exact same code on an SGI the shared library is opened 
 > >  > > and everything works fine.
 > >  > 
 > >  > The big question is, what "-ignore_unresolved" really does.
 > >  > Each dynamic library has a "dependency list".
 > >  > 
 > >  > Maybe "-ignore_unresolved" doesn't create dependency entries under Linux.
 > >  > This may cause runtime-linking to fail.
 > >  > 
 > >  > Try "-export-dynamic" 

Okay.  After the fantastic suggestion from Stefan Traby:

 ST: 'Try to link the main (!) program with "-export-dynamic -shared"'

rather than the dynamic library only we got dlopen to work.  This
might be the solution to GNU glibc PR number 387.  I am not going to
say it is a fix, but it is working for us.

To recap:
Red Hat Linux/Alpha 5.0
glibc 2.05.c build 13 from rpm
egec 1.0.1

Thanks everyone that gave suggestions and answers.  With your help we
got this "bug" that is really an error on our part fixed in a day.

-danimal

-- 
Dan Weeks <danimal@blueskystudios.com>
Blue Sky|VIFX http://www.blueskystudios.com/ http://www.vifx.com/
Harrison, New York 914/381.8400 - Los Angeles, California 310/822.8872
A Dan of many Sombreros!



More information about the Gcc-bugs mailing list