This is the mail archive of the libc-alpha@cygnus.com mailing list for the glibc project.


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

[mcculley@cuspy.com] libc/977: dlopen tries to resolve symbols even when given RTLD_LAZY



Hi,

The appended bug report seems to be similiar to the test
elf/loadfail.c in glibc 2.1.  If elf/loadfail.c is correct, the
reported bug is no bug at all.

Since I couldn't find a rationale for the behaviour of loadfail, I'm
asking for clarification.

The ChangeLog entry mentions RTLD_GLOBAL but even without RTLD_GLOBAL
the test fails.

Andreas

P.S. Here's the ChangeLog entry for loadfail:

1999-01-20  Ulrich Drepper  <drepper@cygnus.com>

        * elf/Makefile (tests): Add loadfail.
        Add rules to build failobj.so.
        * elf/loadfail.c: New file.  Test of failing to load object with
        RTLD_GLOBAL set.
        * elf/failobj.c: New file.  Object which will fail to load.

-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
------- Start of forwarded message -------
Resent-Date: Tue, 16 Feb 1999 16:00:02 -0500
Resent-Message-Id: <199902162100.QAA18070@mescaline.gnu.org>
Resent-From: gnats@gnu.org (GNATS Management)
Resent-To: libc-gnats@gnu.org
Resent-Cc: gnats-admin@gnu.org
Resent-Reply-To: bugs@gnu.org, mcculley@cuspy.com
Message-Id: <199902162051.PAA07860@delysid.gnu.org>
Date: Tue, 16 Feb 1999 15:51:39 -0500
From: mcculley@cuspy.com
Reply-To: mcculley@cuspy.com
To: bugs@gnu.org
Subject: libc/977: dlopen tries to resolve symbols even when given RTLD_LAZY


>Number:         977
>Category:       libc
>Synopsis:       dlopen tries to resolve symbols even when given RTLD_LAZY
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    libc-gnats
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Tue Feb 16 16:00:01 EST 1999
>Last-Modified:
>Originator:     mcculley@cuspy.com
>Organization:
net
>Release:        2.0.7.19981211 (Debian)
>Environment:
Debian GNU/Linux slink (glibc 2.0)
>Description:
It seems that dlopen tries to resolve symbols in a .so even when it is given
RTLD_LAZY and there is no _init function to be run.  This makes it impossible
to build dynamically loadable module based applications that figure out the
dependencies themselves.  This acts differently (IMHO correctly) on an SGI
running IRIX.
>How-To-Repeat:
There is a tar file of a complete example at
http://cuspy.com/~mcculley/dlm.tar.gz.

The programs in the tar file include a harness and two modules that are loaded.
The harness tries to load the modules in reverse order of their dependencies.
This should work as descibed by the documentation as we are using
RTLD_LAZY and nothing is executed, but it fails unless the loading happens
in the right order
>Fix:
>Audit-Trail:
>Unformatted:

------- End of forwarded message -------


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