diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-11-17 09:36:40 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2004-11-17 09:36:40 +0000 |
commit | a5ebab17668503a0887dfcace6904d86de8b1d8f (patch) | |
tree | 4ba37b469d47256d61fb82192365e4aacaf727ec /ldso/libdl/libdl.c | |
parent | 9699ba89100190c80ab51a4637c321a5dde978c5 (diff) |
Add BIND NOW support to MIPS.
Mips did not honour the LD_BIND_NOW env. variable or the DT_BIND_NOW flag
in the dynamic section.
Diffstat (limited to 'ldso/libdl/libdl.c')
-rw-r--r-- | ldso/libdl/libdl.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c index 5a4bb0dce..271b3550f 100644 --- a/ldso/libdl/libdl.c +++ b/ldso/libdl/libdl.c @@ -61,7 +61,7 @@ int _dl_map_cache(void) __attribute__ ((__weak__)); int _dl_unmap_cache(void) __attribute__ ((__weak__)); #endif #ifdef __mips__ -extern void _dl_perform_mips_global_got_relocations(struct elf_resolve *tpnt) +extern void _dl_perform_mips_global_got_relocations(struct elf_resolve *tpnt, int lazy) __attribute__ ((__weak__)); #endif #ifdef __SUPPORT_LD_DEBUG__ @@ -299,13 +299,6 @@ void *dlopen(const char *libname, int flag) * further needs to be done. */ return (void *) dyn_chain; } -#ifdef __mips__ - /* - * Relocation of the GOT entries for MIPS have to be done - * after all the libraries have been loaded. - */ - _dl_perform_mips_global_got_relocations(tpnt); -#endif #ifdef __SUPPORT_LD_DEBUG__ if(_dl_debug) @@ -319,6 +312,15 @@ void *dlopen(const char *libname, int flag) now_flag = (flag & RTLD_NOW) ? RTLD_NOW : 0; if (getenv("LD_BIND_NOW")) now_flag = RTLD_NOW; + +#ifdef __mips__ + /* + * Relocation of the GOT entries for MIPS have to be done + * after all the libraries have been loaded. + */ + _dl_perform_mips_global_got_relocations(tpnt, !now_flag); +#endif + if (_dl_fixup(dyn_chain, now_flag)) goto oops; |