summaryrefslogtreecommitdiff
path: root/ldso/ldso/readelflib1.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-17 00:52:04 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-17 00:52:04 +0000
commitdf6add6279d3ad5b92b143f8781bec329f8c659c (patch)
tree610ff10f4967583f69d30d4d8f5a893951569621 /ldso/ldso/readelflib1.c
parent3bb075634b78b854510807448b8939d98830a4d7 (diff)
Some cleanups needed for things to compile and work as expected
with the new build system... -Erik
Diffstat (limited to 'ldso/ldso/readelflib1.c')
-rw-r--r--ldso/ldso/readelflib1.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c
index 2276d4a9f..fa84dde52 100644
--- a/ldso/ldso/readelflib1.c
+++ b/ldso/ldso/readelflib1.c
@@ -248,8 +248,8 @@ struct elf_resolve *_dl_load_shared_library(int secure,
}
#endif
- /* Check in <install-dir>/usr/lib */
- pnt1 = UCLIBC_ROOT_DIR "/usr/lib/";
+ /* Check in <prefix>/usr/lib */
+ pnt1 = UCLIBC_PREFIX "/usr/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
@@ -261,8 +261,8 @@ struct elf_resolve *_dl_load_shared_library(int secure,
if (tpnt1)
return tpnt1;
- /* Check in <install-dir>/lib */
- pnt1 = UCLIBC_ROOT_DIR "/lib/";
+ /* Check in <prefix>/lib */
+ pnt1 = UCLIBC_PREFIX "/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
@@ -274,7 +274,20 @@ struct elf_resolve *_dl_load_shared_library(int secure,
if (tpnt1)
return tpnt1;
- /* Bummer. Nothing so far. Check in <builddir>/lib */
+ /* Bummer. Nothing so far. Try <devel-dir>/lib */
+ pnt1 = UCLIBC_DEVEL_PREFIX "/lib/";
+ pnt = mylibname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ pnt1 = libname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ *pnt++ = 0;
+ tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0);
+ if (tpnt1)
+ return tpnt1;
+
+ /* Still nothing... Ok, try <builddir>/lib */
pnt1 = UCLIBC_BUILD_DIR "/lib/";
pnt = mylibname;
while (*pnt1)
@@ -287,6 +300,32 @@ struct elf_resolve *_dl_load_shared_library(int secure,
if (tpnt1)
return tpnt1;
+ /* Wow. Still nothing. Try /usr/lib */
+ pnt1 = "/usr/lib/";
+ pnt = mylibname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ pnt1 = libname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ *pnt++ = 0;
+ tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0);
+ if (tpnt1)
+ return tpnt1;
+
+ /* This is our last hope before giving up -- Try /lib */
+ pnt1 = "/lib/";
+ pnt = mylibname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ pnt1 = libname;
+ while (*pnt1)
+ *pnt++ = *pnt1++;
+ *pnt++ = 0;
+ tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0);
+ if (tpnt1)
+ return tpnt1;
+
goof:
/* Well, we shot our wad on that one. All we can do now is punt */
if (_dl_internal_error_number)