summaryrefslogtreecommitdiff
path: root/ldso/libdl
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2002-10-15 21:27:49 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2002-10-15 21:27:49 +0000
commitaa3b269dde6422e3098179c58b5e463515f45cb6 (patch)
treebe2a41c31eebb0557c38d2bf65ccb6730d901977 /ldso/libdl
parent987f4143babc3ac29e9b4c1525d7b935c5d3c7cc (diff)
Fixed 'dlopen' call for MIPS. Things seem to work swimingly. Woohoo!
Diffstat (limited to 'ldso/libdl')
-rw-r--r--ldso/libdl/dlib.c9
-rw-r--r--ldso/libdl/libdl.c9
2 files changed, 18 insertions, 0 deletions
diff --git a/ldso/libdl/dlib.c b/ldso/libdl/dlib.c
index b8f7d9128..563183662 100644
--- a/ldso/libdl/dlib.c
+++ b/ldso/libdl/dlib.c
@@ -196,6 +196,13 @@ void *_dlopen(const char *libname, int flag)
rpnt->next = _dl_symbol_tables;
+ /*
+ * MIPS is special *sigh*
+ */
+#ifdef __mips__
+ _dl_perform_mips_global_got_relocations(tpnt);
+#endif
+
if (do_fixup(tpnt, flag)) {
_dl_error_number = LD_NO_SYMBOL;
goto oops;
@@ -215,6 +222,8 @@ void *_dlopen(const char *libname, int flag)
/* Apparently crt1 for the application is responsible for handling this.
* We only need to run the init/fini for shared libraries
*/
+ if (tpnt->libtype == program_interpreter)
+ continue;
if (tpnt->libtype == elf_executable)
continue;
if (tpnt->init_flag & INIT_FUNCS_CALLED)
diff --git a/ldso/libdl/libdl.c b/ldso/libdl/libdl.c
index b8f7d9128..563183662 100644
--- a/ldso/libdl/libdl.c
+++ b/ldso/libdl/libdl.c
@@ -196,6 +196,13 @@ void *_dlopen(const char *libname, int flag)
rpnt->next = _dl_symbol_tables;
+ /*
+ * MIPS is special *sigh*
+ */
+#ifdef __mips__
+ _dl_perform_mips_global_got_relocations(tpnt);
+#endif
+
if (do_fixup(tpnt, flag)) {
_dl_error_number = LD_NO_SYMBOL;
goto oops;
@@ -215,6 +222,8 @@ void *_dlopen(const char *libname, int flag)
/* Apparently crt1 for the application is responsible for handling this.
* We only need to run the init/fini for shared libraries
*/
+ if (tpnt->libtype == program_interpreter)
+ continue;
if (tpnt->libtype == elf_executable)
continue;
if (tpnt->init_flag & INIT_FUNCS_CALLED)