Subject: Re: CVS commit: src/libexec/ld.elf_so
To: None <>
From: Matthias Drochner <>
List: tech-toolchain
Date: 04/24/2003 18:15:16 said:
> Modified Files:
> 	src/libexec/ld.elf_so: rtld.c rtld.h symbol.c
> Log Message: Attempt to give dlsym() the same symbol-searching
> semantics as _rtld_bind(). 

To elaborate on this (and take it away from the inappropriate list):
It seems that this is wrong.

To quote from SUSv3's dlopen() page:

    Symbols introduced into a program through calls to dlopen() may be
    used in relocation activities. Symbols so introduced may duplicate
    symbols already defined by the program or previous dlopen()
    operations. To resolve the ambiguities such a situation might present,
    the resolution of a symbol reference to symbol definition is based on a
    symbol resolution order. Two such resolution orders are defined: load
    or dependency ordering. Load order establishes an ordering among
    symbol definitions, such that the definition first loaded (including
    definitions from the image file and any dependent objects loaded with
    it) has priority over objects added later (via dlopen()). Load ordering is
    used in relocation processing. Dependency ordering uses a
    breadth-first order starting with a given object, then all of its
    dependencies, then any dependents of those, iterating until all
    dependencies are satisfied. With the exception of the global symbol
    object obtained via a dlopen() operation on a file of 0, dependency
    ordering is used by the dlsym() function. Load ordering is used in
    dlsym() operations upon the global symbol object.

best regards