From cebef70d9071eac41765ecc322cd863368fc737f Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 25 May 2001 01:20:51 +0000 Subject: One last structural change. Install header files to INSTALLDIR/usr/include so we now parallel the behavior of the standard tools. Also make sure we check INSTALLDIR/lib and INSTALLDIR/usr/lib for libraries. -Erik --- ldso/ldso/readelflib1.c | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'ldso/ldso/readelflib1.c') diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c index 4689e51f2..78ba9d0d2 100644 --- a/ldso/ldso/readelflib1.c +++ b/ldso/ldso/readelflib1.c @@ -227,7 +227,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, /* * Where should the cache be searched? There is no such concept in the * ABI, so we have some flexibility here. For now, search it before - * the default path of /usr/lib. + * the hard coded paths that follow (i.e before /lib and /usr/lib). */ #ifdef USE_CACHE if (_dl_cache_addr != NULL && _dl_cache_addr != (caddr_t) - 1) { @@ -247,51 +247,57 @@ struct elf_resolve *_dl_load_shared_library(int secure, } #endif - -#ifdef UCLIBC_DEVEL - - /* Check in /usr/-linux-uclibc/lib */ - pnt1 = UCLIBC_INSTALL_DIR "/lib"; + /* Check in /usr/lib */ + pnt1 = UCLIBC_INSTALL_DIR "/usr/lib/"; pnt = mylibname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; pnt1 = libname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; *pnt++ = 0; tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0); if (tpnt1) - return tpnt1; + return tpnt1; -#else /* UCLIBC_DEVEL */ + /* Check in /lib */ + pnt1 = UCLIBC_INSTALL_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; /* Check in /usr/lib */ pnt1 = "/usr/lib/"; pnt = mylibname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; pnt1 = libname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; *pnt++ = 0; tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0); if (tpnt1) - return tpnt1; + return tpnt1; /* Check in /lib */ - /* try "/lib/". */ pnt1 = "/lib/"; pnt = mylibname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; pnt1 = libname; while (*pnt1) - *pnt++ = *pnt1++; + *pnt++ = *pnt1++; *pnt++ = 0; tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0); if (tpnt1) - return tpnt1; -#endif /* UCLIBC_DEVEL */ + return tpnt1; goof: /* Well, we shot our wad on that one. All we can do now is punt */ -- cgit v1.2.3