summaryrefslogtreecommitdiff
path: root/ldso/ldso/readelflib1.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-03 06:22:20 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-03 06:22:20 +0000
commit4836768df76d3919451aa9f847182c8f5f4068e7 (patch)
tree54feed2e3b0b50e8933bf74486060caa9a134502 /ldso/ldso/readelflib1.c
parent094983cd14c21fe112a5ef09bbd347b938349e86 (diff)
Allow the shared lib loader to fallback on the builddir if everything
else fails. Let <arch>-uclibc-gcc --uclibc-use-build-dir set the shared lib loader to the one in the builddir's path. -Erik
Diffstat (limited to 'ldso/ldso/readelflib1.c')
-rw-r--r--ldso/ldso/readelflib1.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c
index c1a4a41ee..4e1de140e 100644
--- a/ldso/ldso/readelflib1.c
+++ b/ldso/ldso/readelflib1.c
@@ -274,6 +274,19 @@ struct elf_resolve *_dl_load_shared_library(int secure,
if (tpnt1)
return tpnt1;
+ /* Bummer. Nothing so far. Check in <builddir>/lib */
+ pnt1 = UCLIBC_BUILD_DIR "/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)