From 94cc6edb78a12655c0602a246fa1cbdc8c6d0ad9 Mon Sep 17 00:00:00 2001 From: Filippo Arcidiacono Date: Thu, 29 Jul 2010 11:35:05 +0200 Subject: ldso: Rework global scope handling and symbol lookup mechanism Global symbol scope is implemented as a linked list of local scope, that dynamically grows and shrinks when dlopen/ dlclose are called. Each local scope is implemented as an array of pointer to struct elf_resolve. This will help to detect conflict when LD_TRACE_PRELINKING option will be implemented. Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso --- ldso/include/dl-elf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ldso/include/dl-elf.h') diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index dc4af7bce..3e8586444 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -15,6 +15,7 @@ /* Forward declarations for stuff defined in ld_hash.h */ struct dyn_elf; struct elf_resolve; +struct r_scope_elem; #include #ifdef __LDSO_CACHE_SUPPORT__ @@ -30,7 +31,7 @@ static __inline__ void _dl_unmap_cache(void) { } extern void _dl_parse_lazy_relocation_information(struct dyn_elf *rpnt, unsigned long rel_addr, unsigned long rel_size); extern int _dl_parse_relocation_information(struct dyn_elf *rpnt, - unsigned long rel_addr, unsigned long rel_size); + struct r_scope_elem *scope, unsigned long rel_addr, unsigned long rel_size); extern struct elf_resolve * _dl_load_shared_library(int secure, struct dyn_elf **rpnt, struct elf_resolve *tpnt, char *full_libname, int trace_loaded_objects); @@ -39,7 +40,7 @@ extern struct elf_resolve * _dl_load_elf_shared_library(int secure, 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); +extern int _dl_fixup(struct dyn_elf *rpnt, struct r_scope_elem *scope, int flag); extern void _dl_protect_relro (struct elf_resolve *l); /* -- cgit v1.2.3