Re: DLLs [OFFTOPIC]

Juan J. Quintela (quintela@krilin.dc.fi.udc.es)
16 Jul 1998 21:38:13 +0200


Erik Andersen <andersen@inconnect.com> wrote:
>
> I think the question was more directed towards the late binding
> aspects of DLLs. Shared ELF libraried are bound to an executable
> at link time. DLLs can be bound at link time (similar to the shared
> library) or they can be loaded (under Windows anyway) with calls to:
>
> CoLoadLibrary(char * lpszLibName, unsigned long bAutoFree);
> CoFreeLibrary(long hInst);
> CoFreeUnusedLibraries(void);

>From dlopen(3) man page:

#include <dlfcn.h>

void *dlopen (const char *filename, int flag);
const char *dlerror(void);
void *dlsym(void *handle, char *symbol);
int dlclose (void *handle);

> This facilitates certain types of programming. The question then
> was probably, what Linux APIs can be used for late binding of a
> library (comparable to the above mentioned windows APIs).

.....
flag must be either RTLD_LAZY, meaning resolve undefined
symbols as code from the dynamic library is executed, or
RTLD_NOW, meaning resolve all undefined symbols before
dlopen returns,

....

You can use RTLD_LAZY for late binding

> I don't know the answer, and this is off topic, but I would be
> interested in knowing the answer as well.

But I think also that this is off-topic for Linux kernel

Cheers, Juan.

--
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html