diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-04-23 17:43:54 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-04-23 17:43:54 +0000 |
commit | 66f269d2a51dae6a2cb10f1a9ae4aaeba815219b (patch) | |
tree | e2094832990caf6d849ba90e4b1a82a6264f86b3 /ldso/libdl/dlfcn.h | |
parent | c4a3f3f81ea90e3df93c352ac0e2161a4bfd3327 (diff) |
Initial checkin for ld.so. This is a combination of effort from Manuel Novoa
III and me. I've been working on stripping out arch dependant stuff and
replacing it with generic stuff whenever possible.
-Erik
Diffstat (limited to 'ldso/libdl/dlfcn.h')
-rw-r--r-- | ldso/libdl/dlfcn.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/ldso/libdl/dlfcn.h b/ldso/libdl/dlfcn.h new file mode 100644 index 000000000..620181173 --- /dev/null +++ b/ldso/libdl/dlfcn.h @@ -0,0 +1,41 @@ +#ifndef DLFCN_H +#define DLFCN_H + +#include <features.h> + +/* + * Various defines and so forth for the dynamic linker + */ + +/* For dlopen () */ +#define RTLD_LAZY 1 +#define RTLD_NOW 2 +#define RTLD_GLOBAL 0x100 + +/* For dlsym */ +#define RTLD_NEXT ((void *)-1) + +__BEGIN_DECLS + +/* The usual prototypes. We use void * instead of the actual + * datatype - the user does not manipulate the handles at all. + */ + +extern void * dlopen __P((__const char * __filename, int __flag)); +extern __const char * dlerror __P((void)); +extern void * dlsym __P((void *, __const char *)); +extern int dlclose __P((void *)); + +typedef struct +{ + const char * dli_fname; /* filename */ + void * dli_fbase; /* base address of object */ + const char * dli_sname; /* nearest symbol name */ + void * dli_saddr; /* nearest symbol address */ +} Dl_info; + +extern int dladdr __P((void * __address, Dl_info * __dlip )); + +__END_DECLS + +#endif |