summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-20 14:05:44 -0400
committerAustin Foxley <austinf@cetoncorp.com>2009-08-19 12:25:17 -0700
commite170e709707d965e1627d0f77e1876385adddc99 (patch)
tree9d2cb496e186a37c32eb7b52d3bdde10331fe7e3
parent7da78e4164ad2172ad8eeace1beade76f2e643da (diff)
downloaduClibc-alpine-e170e709707d965e1627d0f77e1876385adddc99.tar.bz2
uClibc-alpine-e170e709707d965e1627d0f77e1876385adddc99.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> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
-rw-r--r--ldso/include/ldso.h5
-rw-r--r--libc/misc/elf/dl-iterate-phdr.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h
index 5d03f7656..1dd35febc 100644
--- a/ldso/include/ldso.h
+++ b/ldso/include/ldso.h
@@ -33,6 +33,7 @@
/* Pull in the arch specific page size */
#include <bits/uClibc_page.h>
/* Pull in the ldso syscalls and string functions */
+#ifndef __ARCH_HAS_NO_SHARED__
#include <dl-syscall.h>
#include <dl-string.h>
/* Now the ldso specific headers */
@@ -139,4 +140,8 @@ extern void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load
#include <dl-inlines.h>
#endif
+#else /* __ARCH_HAS_NO_SHARED__ */
+#include <dl-defs.h>
+#endif
+
#endif /* _LDSO_H_ */
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)