diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-02-07 10:12:25 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-02-07 10:12:25 +0000 |
commit | 2e723e150ab9b11e658311d6dfe2a1c1e402b833 (patch) | |
tree | 3dd87f0a3bcc014b30ba226b7efbdb1c143b08fe /ldso/include | |
parent | cdf8ceb36ff80e68c0ffbde96b20cb088a9fe59b (diff) |
Step one, begin shuffling things around a bit
Diffstat (limited to 'ldso/include')
-rw-r--r-- | ldso/include/dl-elf.h | 7 | ||||
-rw-r--r-- | ldso/include/ld_elf.h | 7 | ||||
-rw-r--r-- | ldso/include/ldso.h | 46 |
3 files changed, 56 insertions, 4 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index 34a3c62ad..04c450fc5 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -65,11 +65,14 @@ extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt, extern int _dl_parse_relocation_information(struct dyn_elf *rpnt, unsigned long rel_addr, unsigned long rel_size, int type); extern struct elf_resolve * _dl_load_shared_library(int secure, - struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname); + struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname, + int trace_loaded_objects); extern struct elf_resolve * _dl_load_elf_shared_library(int secure, struct dyn_elf **rpnt, char *libname); -extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname); +extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname, + int trace_loaded_objects); extern int _dl_linux_resolve(void); +extern int _dl_fixup(struct dyn_elf *rpnt, int flag); /* diff --git a/ldso/include/ld_elf.h b/ldso/include/ld_elf.h index 34a3c62ad..04c450fc5 100644 --- a/ldso/include/ld_elf.h +++ b/ldso/include/ld_elf.h @@ -65,11 +65,14 @@ extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt, extern int _dl_parse_relocation_information(struct dyn_elf *rpnt, unsigned long rel_addr, unsigned long rel_size, int type); extern struct elf_resolve * _dl_load_shared_library(int secure, - struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname); + struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname, + int trace_loaded_objects); extern struct elf_resolve * _dl_load_elf_shared_library(int secure, struct dyn_elf **rpnt, char *libname); -extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname); +extern struct elf_resolve *_dl_check_if_named_library_is_loaded(const char *full_libname, + int trace_loaded_objects); extern int _dl_linux_resolve(void); +extern int _dl_fixup(struct dyn_elf *rpnt, int flag); /* diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 621236fdf..15f76ee80 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -1,3 +1,6 @@ +#ifndef _LDSO_H_ +#define _LDSO_H_ + #include <features.h> /* Pull in compiler and arch stuff */ #include <stdlib.h> @@ -30,3 +33,46 @@ #define __LINUX_COMPILER_H #endif + +/* Global variables used within the shared library loader */ +extern char *_dl_library_path; /* Where we look for libraries */ +extern char *_dl_preload; /* Things to be loaded before the libs */ +extern char *_dl_ldsopath; /* Where the shared lib loader was found */ +extern const char *_dl_progname; /* The name of the executable being run */ +extern unsigned char *_dl_malloc_addr; /* Lets _dl_malloc use the already allocated memory page */ +extern unsigned char *_dl_mmap_zero; /* Also used by _dl_malloc */ +extern unsigned long *_dl_brkp; /* The end of the data segment for brk and sbrk */ +extern unsigned long *_dl_envp; /* The environment address */ +extern int _dl_secure; /* Are we dealing with setuid stuff? */ + +#ifdef __SUPPORT_LD_DEBUG__ +extern char *_dl_debug; +extern char *_dl_debug_symbols; +extern char *_dl_debug_move; +extern char *_dl_debug_reloc; +extern char *_dl_debug_detail; +extern char *_dl_debug_nofixups; +extern char *_dl_debug_bindings; +extern int _dl_debug_file; +#else +#define _dl_debug_file 2 +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +extern void *_dl_malloc(int size); +extern char *_dl_getenv(const char *symbol, char **envp); +extern void _dl_unsetenv(const char *symbol, char **envp); +extern char *_dl_strdup(const char *string); +extern void _dl_dprintf(int, const char *, ...); + +extern void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *app_tpnt, + unsigned long load_addr, unsigned long *hash_addr, + Elf32_auxv_t auxvt[AT_EGID + 1], char **envp, struct r_debug *debug_addr, + unsigned char *malloc_buffer, unsigned char *mmap_zero, char **argv); + + +#endif /* _LDSO_H_ */ + |