summaryrefslogtreecommitdiffstats
path: root/libc/misc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-20 14:05:44 -0400
committerMike Frysinger <vapier@gentoo.org>2009-07-20 14:05:44 -0400
commit82be16427666e8e63af7233345ca949f471acaa6 (patch)
tree38db8baf5d242bf745757dc4f45f539d2c305b35 /libc/misc
parentf3ba5c94eb3463a0119de2c567d1a475ff206be5 (diff)
downloaduClibc-alpine-82be16427666e8e63af7233345ca949f471acaa6.tar.bz2
uClibc-alpine-82be16427666e8e63af7233345ca949f471acaa6.tar.xz
fix building for systems w/out ldso support
If an arch (like alpha and others) have no ldso support at all, then there is no point in attempting to walk loaded modules in the dl-* helper funcs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'libc/misc')
-rw-r--r--libc/misc/elf/dl-iterate-phdr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libc/misc/elf/dl-iterate-phdr.c b/libc/misc/elf/dl-iterate-phdr.c
index a2bb9e000..6561ed69e 100644
--- a/libc/misc/elf/dl-iterate-phdr.c
+++ b/libc/misc/elf/dl-iterate-phdr.c
@@ -24,9 +24,10 @@ hidden_proto(__dl_iterate_phdr)
int
__dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void *data), void *data)
{
+ int ret = 0;
+#ifndef __ARCH_HAS_NO_SHARED__
struct elf_resolve *l;
struct dl_phdr_info info;
- int ret = 0;
for (l = _dl_loaded_modules; l != NULL; l = l->next) {
info.dlpi_addr = l->loadaddr;
@@ -37,6 +38,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info, size_t size, void
if (ret)
break;
}
+#endif
return ret;
}
hidden_def (__dl_iterate_phdr)