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/config.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/config.h')
-rw-r--r-- | ldso/config.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/ldso/config.h b/ldso/config.h new file mode 100644 index 000000000..1d1429dc1 --- /dev/null +++ b/ldso/config.h @@ -0,0 +1,59 @@ +#ifdef DEBUG +# define LDSO_IMAGE "../ld-so/ld.so" +# define LDSO_CONF "../util/ld.so.conf" +# define LDSO_CACHE "../util/ld.so.cache" +# define LDSO_PRELOAD "../util/ld.so.preload" +# define LDDSTUB "../util/lddstub" +#elif UCLIBC_DEVEL +# define LDSO_IMAGE UCLIBC_INSTALL_DIR"/lib/ld.so" +# define LDSO_CONF UCLIBC_INSTALL_DIR"/etc/ld.so.conf" +# define LDSO_CACHE UCLIBC_INSTALL_DIR"/etc/ld.so.cache" +# define LDSO_PRELOAD UCLIBC_INSTALL_DIR"/etc/ld.so.preload" +# define LDDSTUB UCLIBC_INSTALL_DIR"/lib/lddstub" +#else +# define LDSO_IMAGE "/lib/ld.so" +# define LDSO_CONF "/etc/ld.so.conf" +# define LDSO_CACHE "/etc/ld.so.cache" +# define LDSO_PRELOAD "/etc/ld.so.preload" +# define LDDSTUB "/usr/lib/lddstub" +#endif + +#define LDD_ARGV0 "__LDD_ARGV0" +#define DIR_SEP ":, \t\n" +#define MAX_DIRS 32 + +typedef void (*loadptr)(int func, ...); +typedef void (*callbackptr)(int ver, int nlibs, char **libs, + int nmods, char **mods); + +#define CALLBACK_VER 1 + +#define LIB_ANY -1 +#define LIB_DLL 0 +#define LIB_ELF 1 +#define LIB_ELF_LIBC5 2 +#define LIB_ELF_LIBC6 3 +#define LIB_ELF64 0x80 + +#define FUNC_VERS 0 +#define FUNC_LDD 1 +#define FUNC_LINK 2 +#define FUNC_LINK_AND_CALLBACK 3 + +#define LDSO_CACHE_MAGIC "ld.so-" +#define LDSO_CACHE_MAGIC_LEN (sizeof LDSO_CACHE_MAGIC -1) +#define LDSO_CACHE_VER "1.7.0" +#define LDSO_CACHE_VER_LEN (sizeof LDSO_CACHE_VER -1) + +typedef struct { + char magic [LDSO_CACHE_MAGIC_LEN]; + char version [LDSO_CACHE_VER_LEN]; + int nlibs; +} header_t; + +typedef struct { + int flags; + int sooffset; + int liboffset; +} libentry_t; + |