RFC: passdb redesign

Andrew Tridgell tridge at linuxcare.com
Tue Nov 14 03:56:28 GMT 2000


>> Aren't function pointers the only way to access the functions in
>> a loadable module loaded with dlopen()?
>
> Nope.  Not by my tests.  The entire namespace from the shared
> library is available.  Just call the function directly.  At least on
> Linux is seems to work like this.  Haven't tried other platforms
> yet.

It doesn't work like that on any platform. If you call a function that
doesn't exist at the time you produce the executable then the creation
of the executable will fail (there are flags to ld on some systems
that can change this behaviour, but we definately don't want to start
using them).

Different platforms do vary on whether names from the main program are
directly available from the shared library (and some systems have
flags to control this) but to access symbols in shared libraries that
are loaded at runtime using dlopen() you must use the function pointer
returned from dlsym(). 




More information about the samba-technical mailing list