summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/README19
-rw-r--r--ldso/Rules.mak7
-rw-r--r--ldso/config.h10
-rw-r--r--ldso/ldso/dl-elf.c30
-rw-r--r--ldso/ldso/readelflib1.c30
-rw-r--r--ldso/util/ldconfig.c6
6 files changed, 13 insertions, 89 deletions
diff --git a/ldso/README b/ldso/README
index b5bb93e67..dc37ea65c 100644
--- a/ldso/README
+++ b/ldso/README
@@ -5,25 +5,6 @@ Inital port for uClibc from debian ld.so_1.9.11-9.tar.gz.
Removed a.out support.
-"make" generates the ld-uclibc.so.0, libdl.so.0, ldd, ldconfig
- suitable for the target platform.
-
-"make DEVEL=true" generates the same files, but ld-uclibc.so.0 and
- ldconfig are modified to not conflict with the devel platform system
- libs. (This is only of use if TARGET_ARCH == NATIVE_ARCH.) These
- modified versions ignore /lib and /usr/lib and look for shared libs
- only in $(INSTALL_DIR)/lib. The modified ldconfig writes ld.so.cache
- in $(INSTALL_DIR)/etc.
-
-The above assumes you've set the DYNAMIC_LINKER to /lib/ld-uclibc.so.0
-in extra/gcc-uClibc/Makefile.
-
-Todo:
-
-Remove unneeded code in util/ldd.c.
-Link against static uClibc instead of using custom routines. ???
-Lots more cleanup... especially the arch-dependent Makefiles.
-
****************** original ld.so.lsm file **************************
Begin3
Title: Linux shared, dynamic linker and utilities.
diff --git a/ldso/Rules.mak b/ldso/Rules.mak
index c0bd561bb..f2eccd4a8 100644
--- a/ldso/Rules.mak
+++ b/ldso/Rules.mak
@@ -2,12 +2,9 @@ include $(TOPDIR)Rules.mak
LDSO_VERSION=1.9.11
-DEVEL=true
-
# Do NOT use -fomit-frame-pointer -- It won't work!
CFLAGS += -DVERSION=\"$(LDSO_VERSION)\"
CC = $(TOPDIR)extra/gcc-uClibc/$(NATIVE_ARCH)-uclibc-gcc
-ifeq ($(DEVEL),true)
- CFLAGS += -DUCLIBC_INSTALL_DIR=\"$(INSTALL_DIR)\"
-endif
+
+CFLAGS += -DUCLIBC_ROOT_DIR=\"$(ROOT_DIR)\"
diff --git a/ldso/config.h b/ldso/config.h
index 26171138d..3dbf0cdfa 100644
--- a/ldso/config.h
+++ b/ldso/config.h
@@ -5,11 +5,11 @@
# define LDSO_PRELOAD "../util/ld.so.preload"
# define LDDSTUB "../util/lddstub"
#else
-# define LDSO_IMAGE UCLIBC_INSTALL_DIR"/lib/ld.so"
-# define LDSO_CONF UCLIBC_INSTALL_DIR"/etc/ld.so.conf"
-# define LDSO_CACHE UCLIBC_INSTALL_DIR"/etc/ld.so.cache"
-# define LDSO_PRELOAD UCLIBC_INSTALL_DIR"/etc/ld.so.preload"
-# define LDDSTUB UCLIBC_INSTALL_DIR"/usr/lib/lddstub"
+# define LDSO_IMAGE UCLIBC_ROOT_DIR "/lib/ld.so"
+# define LDSO_CONF UCLIBC_ROOT_DIR "/etc/ld.so.conf"
+# define LDSO_CACHE UCLIBC_ROOT_DIR "/etc/ld.so.cache"
+# define LDSO_PRELOAD UCLIBC_ROOT_DIR "/etc/ld.so.preload"
+# define LDDSTUB UCLIBC_ROOT_DIR "/usr/lib/lddstub"
#endif
#define LDD_ARGV0 "__LDD_ARGV0"
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index 78ba9d0d2..a80aa0579 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -248,7 +248,7 @@ struct elf_resolve *_dl_load_shared_library(int secure,
#endif
/* Check in <install-dir>/usr/lib */
- pnt1 = UCLIBC_INSTALL_DIR "/usr/lib/";
+ pnt1 = UCLIBC_ROOT_DIR "/usr/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
@@ -261,33 +261,7 @@ struct elf_resolve *_dl_load_shared_library(int secure,
return tpnt1;
/* Check in <install-dir>/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++;
- pnt1 = libname;
- while (*pnt1)
- *pnt++ = *pnt1++;
- *pnt++ = 0;
- tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0);
- if (tpnt1)
- return tpnt1;
-
- /* Check in /lib */
- pnt1 = "/lib/";
+ pnt1 = UCLIBC_ROOT_DIR "/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c
index 78ba9d0d2..a80aa0579 100644
--- a/ldso/ldso/readelflib1.c
+++ b/ldso/ldso/readelflib1.c
@@ -248,7 +248,7 @@ struct elf_resolve *_dl_load_shared_library(int secure,
#endif
/* Check in <install-dir>/usr/lib */
- pnt1 = UCLIBC_INSTALL_DIR "/usr/lib/";
+ pnt1 = UCLIBC_ROOT_DIR "/usr/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
@@ -261,33 +261,7 @@ struct elf_resolve *_dl_load_shared_library(int secure,
return tpnt1;
/* Check in <install-dir>/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++;
- pnt1 = libname;
- while (*pnt1)
- *pnt++ = *pnt1++;
- *pnt++ = 0;
- tpnt1 = _dl_load_elf_shared_library(secure, mylibname, 0);
- if (tpnt1)
- return tpnt1;
-
- /* Check in /lib */
- pnt1 = "/lib/";
+ pnt1 = UCLIBC_ROOT_DIR "/lib/";
pnt = mylibname;
while (*pnt1)
*pnt++ = *pnt1++;
diff --git a/ldso/util/ldconfig.c b/ldso/util/ldconfig.c
index 5c041f8b8..55f79f773 100644
--- a/ldso/util/ldconfig.c
+++ b/ldso/util/ldconfig.c
@@ -684,10 +684,8 @@ int main(int argc, char **argv)
free(extpath);
}
- scan_dir(UCLIBC_INSTALL_DIR"/usr/lib");
- scan_dir(UCLIBC_INSTALL_DIR"/lib");
- scan_dir("/usr/lib");
- scan_dir("/lib");
+ scan_dir(UCLIBC_ROOT_DIR "/usr/lib");
+ scan_dir(UCLIBC_ROOT_DIR "/lib");
}
if (!nocache)