This is the mail archive of the glibc-bugs@sourceware.org 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]
Other format: [Raw text]

[Bug libc/1319] dlsym/RTLD_NEXT is broken when more than 1 lib has the symbol.


https://sourceware.org/bugzilla/show_bug.cgi?id=1319

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |carlos at redhat dot com
         Resolution|WONTFIX                     |---
           Assignee|gotom at debian dot or.jp          |carlos at redhat dot com

--- Comment #12 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #11)
> It's puzzling why this isn't a bug.  I suspect RTLD_NEXT implements
> dependency order instead of load order.  Even back in 2005, we could no
> longer change that, and the only way to deal with this is to document the
> discrepancy with other systems.

POSIX requires dlsym implement dependency ordering, it's written into the
standard, see the text in dlopen:
~~~
...
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.
...
~~~

I'm reopening this because regardless of the fact that POSIX only reserves
RTLD_NEXT we are basically implementing a Solaris feature and need to
reconsider exactly what RTLD_NEXT does when we have more than 1 library with
the symbol.

It seems entirely reasonable to be able to walk the entire hierarchy of defined
symbols instead of stopping at the first definition.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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