diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-10-07 13:48:21 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-10-07 13:48:21 +0000 |
commit | c8473092e07d4ab6b506706c7d8b1bef4c18dca6 (patch) | |
tree | d1b1f5452357ad9348c426e54515ff78e3aef362 /ldso | |
parent | 1b0ea2fab703f813dcd506d2de311753246b4f8c (diff) |
Remove usage of _dl_parse_copy_information() from generic code.
Remove definition of _dl_parse_copy_information() for powerpc.
Remaining archs can do the same.
Make debugging output of "relocation processing: xxx" a bit more sane.
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/include/dl-elf.h | 2 | ||||
-rw-r--r-- | ldso/include/dl-hash.h | 9 | ||||
-rw-r--r-- | ldso/ldso/dl-elf.c | 17 | ||||
-rw-r--r-- | ldso/ldso/ldso.c | 4 | ||||
-rw-r--r-- | ldso/ldso/powerpc/elfinterp.c | 9 |
5 files changed, 8 insertions, 33 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index 66843096c..d70d84ae4 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -20,8 +20,6 @@ static inline void _dl_unmap_cache(void) { } /* Function prototypes for non-static stuff in readelflib1.c */ -extern int _dl_parse_copy_information(struct dyn_elf *rpnt, - unsigned long rel_addr, unsigned long rel_size); 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, diff --git a/ldso/include/dl-hash.h b/ldso/include/dl-hash.h index 38b50bc65..67484d260 100644 --- a/ldso/include/dl-hash.h +++ b/ldso/include/dl-hash.h @@ -61,11 +61,10 @@ struct elf_resolve{ #endif }; -#define COPY_RELOCS_DONE 1 -#define RELOCS_DONE 2 -#define JMP_RELOCS_DONE 4 -#define INIT_FUNCS_CALLED 8 -#define FINI_FUNCS_CALLED 16 +#define RELOCS_DONE 1 +#define JMP_RELOCS_DONE 2 +#define INIT_FUNCS_CALLED 4 +#define FINI_FUNCS_CALLED 8 extern struct dyn_elf * _dl_symbol_tables; extern struct elf_resolve * _dl_loaded_modules; diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 80c8fe438..3e4e3482c 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -741,7 +741,8 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) tpnt = rpnt->dyn; #if defined (__SUPPORT_LD_DEBUG__) - if(_dl_debug) _dl_dprintf(_dl_debug_file,"\nrelocation processing: %s", tpnt->libname); + if(_dl_debug && !(tpnt->init_flag & RELOCS_DONE)) + _dl_dprintf(_dl_debug_file,"\nrelocation processing: %s\n", tpnt->libname); #endif if (unlikely(tpnt->dynamic_info[UNSUPPORTED_RELOC_TYPE])) { @@ -784,20 +785,6 @@ int _dl_fixup(struct dyn_elf *rpnt, int now_flag) } } - if (tpnt->init_flag & COPY_RELOCS_DONE) - return goof; - tpnt->init_flag |= COPY_RELOCS_DONE; - goof += _dl_parse_copy_information(rpnt, - tpnt->dynamic_info[DT_RELOC_TABLE_ADDR], - tpnt->dynamic_info[DT_RELOC_TABLE_SIZE]); - -#if defined (__SUPPORT_LD_DEBUG__) - if(_dl_debug) { - _dl_dprintf(_dl_debug_file,"\nrelocation processing: %s", tpnt->libname); - _dl_dprintf(_dl_debug_file,"; finished\n\n"); - } -#endif - return goof; } diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 02dd786f2..71905b9c0 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -759,14 +759,14 @@ next_lib2: tpnt->rtld_flags = RTLD_NOW | RTLD_GLOBAL; /* Must not be LAZY */ #ifdef RERELOCATE_LDSO /* Only rerelocate functions for now. */ - tpnt->init_flag = RELOCS_DONE | COPY_RELOCS_DONE; + tpnt->init_flag = RELOCS_DONE; lpnt = (unsigned long *) (tpnt->dynamic_info[DT_PLTGOT] + load_addr); # ifdef ALLOW_ZERO_PLTGOT if (tpnt->dynamic_info[DT_PLTGOT]) # endif INIT_GOT(lpnt, tpnt); #else - tpnt->init_flag = RELOCS_DONE | JMP_RELOCS_DONE | COPY_RELOCS_DONE; + tpnt->init_flag = RELOCS_DONE | JMP_RELOCS_DONE; #endif tpnt = NULL; } diff --git a/ldso/ldso/powerpc/elfinterp.c b/ldso/ldso/powerpc/elfinterp.c index e959468ae..d154a18a4 100644 --- a/ldso/ldso/powerpc/elfinterp.c +++ b/ldso/ldso/powerpc/elfinterp.c @@ -477,12 +477,3 @@ int _dl_parse_relocation_information(struct dyn_elf *rpnt, { return _dl_parse(rpnt->dyn, rpnt->dyn->symbol_scope, rel_addr, rel_size, _dl_do_reloc); } - -/* Should be a static inline instead, but that conflicts with ld_elf.h */ -int _dl_parse_copy_information(struct dyn_elf *rpnt, - unsigned long rel_addr, unsigned long rel_size) -{ - /* Not used! */ - return 0; -} - |