* Re: dlopen() bug on Linux/Alpha ( Was: Unidentified subject!)
@ 1998-01-11 3:07 Richard Hadsell
0 siblings, 0 replies; 4+ messages in thread
From: Richard Hadsell @ 1998-01-11 3:07 UTC (permalink / raw)
Dan Weeks wrote:
>
> 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.
A suggestion from Uncle George forced me to write a simple example, and
that led me into interpreting the error. After looking up the man page
for dlopen on my Irix machine (none on my alpha), I discovered dlerror
(). Its error message points to the unresolved symbol that caused the
failure to open. For now, I assume that it's my problem and not a bug
in libdl. I'll bring it up again, only if I determine that the symbol
should have been resolved.
--
Dick Hadsell 914-381-8400 Fax: 914-381-9790
Reply-to: hadsell@blueskystudios.com
Blue Sky | VIFX http://www.blueskystudios.com
1 South Road, Harrison, NY 10528
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: dlopen() bug on Linux/Alpha ( Was: Unidentified subject!)
@ 1998-01-10 21:41 Stefan Traby
1998-01-10 23:02 ` Dan Weeks
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Traby @ 1998-01-10 21:41 UTC (permalink / raw)
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"
[man 1 ld ....]
-export-dynamic
When creating an ELF file, add all symbols to the
dynamic symbol table. Normally, the dynamic symbol
table contains only symbols which are used by a dy-
namic object. This option is needed for some uses
of dlopen.
Hope it helps.
--
ciao -
Stefan
Stefan Traby phone: +43-3133-6107-2
Mitterlasznitzstr. 13 fax: +43-3133-6107-9
8302 Nestelbach mailto://stefan@sime.com
Austria
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: dlopen() bug on Linux/Alpha ( Was: Unidentified subject!)
1998-01-10 21:41 Stefan Traby
@ 1998-01-10 23:02 ` Dan Weeks
0 siblings, 0 replies; 4+ messages in thread
From: Dan Weeks @ 1998-01-10 23:02 UTC (permalink / raw)
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
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"
>
>
> [man 1 ld ....]
> -export-dynamic
> When creating an ELF file, add all symbols to the
> dynamic symbol table. Normally, the dynamic symbol
> table contains only symbols which are used by a dy-
> namic object. This option is needed for some uses
> of dlopen.
>
> Hope it helps.
--
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
nunc est bibendum
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* dlopen() bug on Linux/Alpha ( Was: Unidentified subject!)
@ 1998-01-10 20:45 Dan Weeks
0 siblings, 0 replies; 4+ messages in thread
From: Dan Weeks @ 1998-01-10 20:45 UTC (permalink / raw)
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.
-danimal
Dan Weeks writes:
> Hello:
>
> I am using Red Hat 5.0 on a 433 MHz Carrera computer running at
> kernel level 2.0.32. Currently I have the latest glibc (2.0.5c build
> 13) rpm from Red Hat. I have also built a new set of the glibc
> libraries using these sources. The only compiler that I have used for
> both building the libraries and our code is egcs-1.0.1.
>
> The problem that we are running into is that when we attempt to
> open a shared library (*.so) that we have compiled the dlopen() call
> fails. These shared libraries are dynamic procedures for a larger
> program that we write in-house. During the linking phase for the shared
> library we use the options -shared and -ignore_unresolved so that any
> symbols that are in the larger program will be passed over and an .so
> will be produced (I'm not sure that -ignore_unresolved is supported on
> Linux, here is its entry in the SGI man page:
>
> -ignore_unresolved
> This option causes an executable or DSO to be produced and ld to
> exit with zero status even if there are unresolved symbols;
> resolution of these symbols will be completed by rld . If linking
> -call_shared, a list of the unresolved symbols will be output (as it
> always is for -call_shared). If linking -shared, no such list will
> be output. If linking -non_shared, this option is ignored (and
> -no_unresolved is used, as it always is for -non_shared). This
> option is the default for -shared linking, but not for -call_shared
> or -non_shared.
>
> ).
>
>
> I looked at the GNATS system at GNU but the only dlopen reference I
> found was at
> http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl/full/387 . This
> seems to be like the problem we are having, but I can't tell exactly.
> I guess that what could be happening is that the shared library is
> loaded, can't find symbols in the main program and dies, killing the
> main process.
>
> I noticed that a glibc-2.0.6 was available on prep.ai.mit.edu but it
> looks to not have a fix for dlopen in it.
>
> If anyone has any insight into this bug i would appreciate some
> feedback. Also, if a bug report at GNU is needed I will gladly submit
> one.
>
--
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
"Good, Bad, I'm the guy with the gun." - Ash
--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject. Do not send it to axp-list@redhat.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1998-01-11 3:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-11 3:07 dlopen() bug on Linux/Alpha ( Was: Unidentified subject!) Richard Hadsell
-- strict thread matches above, loose matches on Subject: below --
1998-01-10 21:41 Stefan Traby
1998-01-10 23:02 ` Dan Weeks
1998-01-10 20:45 Dan Weeks
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox