RFC: libverto nearing release

Nico Williams nico at cryptonector.com
Tue Jul 5 19:06:28 EDT 2011


On Tue, Jul 5, 2011 at 11:27 AM, Nathaniel McCallum
<npmccallum at redhat.com> wrote:
> On Thu, 2011-06-30 at 23:05 -0400, Greg Hudson wrote:
>> 1. Testing whether you're linked to a particular library seems
>> questionably portable.
>
> Seeing that we are using a standard symbol resolution with dlsym() this
> should be portable enough. I've used this technique in other projects
> and the only place I've ever seen it fail is if a library is linked in
> via dlopen() with the RTLD_LOCAL flag. I'm not aware of any OS which,
> when doing standard dynamic linking, does not make the symbols available
> for dlsym() (including win32 btw). In short, this technique should work
> everywhere that matters.

The issue is interposers on the global link map.

What you want is to use RTLD_GROUP (Solaris) or RTLD_DEEPBIND (Linux)
if either is available.  If neither is available then you simply
document the requirement that there be no interposition.  Now, if you
have neither of those flags and the symbols in the library in question
are also provided by another provider in the link map ahead of this
library, then you have a problem.

Nico
--



More information about the krbdev mailing list