[lkml]   [1998]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: DLLs [OFFTOPIC]

Erik Andersen <> 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
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:43    [W:0.075 / U:1.796 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site