summaryrefslogtreecommitdiff
path: root/ldso/util
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-08-08 17:03:36 +0000
committerEric Andersen <andersen@codepoet.org>2001-08-08 17:03:36 +0000
commitc3bbc0eafdae7a50c46ec61f3352821b7c28ea85 (patch)
treea3f8e5d23017c4301813b6c6302d1277ed216efd /ldso/util
parentc4257d720039474be6804b20c4d133a65aa1d265 (diff)
This syncs things up with my local tree. Mainly changes installer
issues, and syns things (as far as I am willing) with Dave Schleef's tree. We may need to go another round or so, but we do seem to be converging...
Diffstat (limited to 'ldso/util')
-rw-r--r--ldso/util/Makefile10
-rw-r--r--ldso/util/ldconfig.c4
-rw-r--r--ldso/util/ldd.c8
3 files changed, 18 insertions, 4 deletions
diff --git a/ldso/util/Makefile b/ldso/util/Makefile
index a5eb9ad6c..baa3fa897 100644
--- a/ldso/util/Makefile
+++ b/ldso/util/Makefile
@@ -8,7 +8,7 @@ readsoname.o: readsoname.c readsoname2.c
$(STRIPTOOL) -x -R .note -R .comment $*.o
ldconfig.o: ldconfig.c
- $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_PREFIX=\"$(PREFIX)\" \
+ $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
-c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
@@ -16,14 +16,20 @@ readelf: readelf.c
$(TARGET_CC) $(TARGET_CFLAGS) -static readelf.c -o $@
$(STRIPTOOL) -x -R .note -R .comment $@
+ifeq ($(strip $(LIBRARY_CACHE)),)
+ldconfig:
+ echo "LIBRARY_CACHE disabled -- not building ldconfig"
+else
ldconfig: ldconfig.o readsoname.o
$(TARGET_CC) $(TARGET_CFLAGS) -static $^ -o $@
$(STRIPTOOL) -x -R .note -R .comment $@
+endif
ldd: ldd.c
- $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_PREFIX=\"$(PREFIX)\" \
+ $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
-DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR); pwd)\" \
+ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \
-static ldd.c -o $@
$(STRIPTOOL) -x -R .note -R .comment $@
diff --git a/ldso/util/ldconfig.c b/ldso/util/ldconfig.c
index 054b82a93..63765a78c 100644
--- a/ldso/util/ldconfig.c
+++ b/ldso/util/ldconfig.c
@@ -683,8 +683,8 @@ int main(int argc, char **argv)
free(extpath);
}
- scan_dir(UCLIBC_PREFIX "/usr/lib");
- scan_dir(UCLIBC_PREFIX "/lib");
+ scan_dir(UCLIBC_TARGET_PREFIX "/usr/lib");
+ scan_dir(UCLIBC_TARGET_PREFIX "/lib");
}
if (!nocache)
diff --git a/ldso/util/ldd.c b/ldso/util/ldd.c
index fd0ff54b3..e8627fb0a 100644
--- a/ldso/util/ldd.c
+++ b/ldso/util/ldd.c
@@ -222,6 +222,10 @@ static int add_library(Elf32_Ehdr* ehdr, Elf32_Dyn* dynamic, char *strtab, int i
if (!s || !strlen(s))
return 1;
+ /* We add libc.so.0 elsewhere */
+ if (strcmp(s, UCLIBC_LDSO)==0)
+ return 1;
+
for (cur = lib_list; cur; cur=cur->next) {
if(strcmp(cur->name, s)==0) {
/* Lib is already in the list */
@@ -396,9 +400,13 @@ int main( int argc, char** argv)
/* Print the list */
+ got_em_all=0;
for (cur = lib_list; cur; cur=cur->next) {
+ got_em_all=1;
printf("\t%s => %s\n", cur->name, cur->path);
}
+ if (got_em_all==0)
+ printf("\tnot a dynamic executable\n");
return 0;
}