diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-03-19 15:34:26 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-03-19 15:34:26 +0000 |
commit | 8d84dd3fa44ea7c6dc3da1c78aedfb291a7c4689 (patch) | |
tree | afd599d9d6206ed04f59f60cef35b911dd1324c8 | |
parent | ebb7fa188fe88fafecdbe4ad9b87d2afa703b503 (diff) |
Revert my symlink detecting change for now, since it breaks
things.
-Erik
-rw-r--r-- | ldso/ldso/ldso.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/ldso/ldso/ldso.c b/ldso/ldso/ldso.c index 356fe6b02..370c844ba 100644 --- a/ldso/ldso/ldso.c +++ b/ldso/ldso/ldso.c @@ -654,31 +654,21 @@ static void _dl_get_ready_to_run(struct elf_resolve *tpnt, struct elf_resolve *a INIT_GOT(lpnt, _dl_loaded_modules); } /* OK, fill this in - we did not have this before */ - if (ppnt->p_type == PT_INTERP) { - int readsize = 0; - char *libname, *pnt, *pnt1, buf[1024]; - - libname = (char *) (ppnt->p_offset + + if (ppnt->p_type == PT_INTERP) { + char *pnt, *pnt1; + tpnt->libname = _dl_strdup((char *) ppnt->p_offset + (auxvt[AT_PHDR].a_un.a_val & 0xfffff000)); /* Store the path where the shared lib loader was found for * later use */ - readsize = _dl_readlink(libname, buf, sizeof(buf)); - if (readsize > 0 && readsize < sizeof(buf)-1) { - buf[readsize] = '\0'; -#ifdef DL_DEBUG - _dl_dprintf(2, "Lib Loader '%s'\nis a symlink to '%s'\n", libname, buf); -#endif - tpnt->libname = _dl_strdup(buf); - } else { - tpnt->libname = _dl_strdup(libname); - } pnt = _dl_strdup(tpnt->libname); pnt1 = _dl_strrchr(pnt, '/'); if (pnt != pnt1) { *pnt1 = '\0'; + _dl_ldsopath = pnt; + } else { + _dl_ldsopath = tpnt->libname; } - _dl_ldsopath = pnt; #ifdef DL_DEBUG _dl_dprintf(2, "Lib Loader:\t(%x) %s\n", tpnt->loadaddr, tpnt->libname); #endif |