summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libexec/rtld-elf/malloc.c17
-rw-r--r--libexec/rtld-elf/rtld.c17
-rw-r--r--libexec/rtld-elf/rtld.h2
3 files changed, 17 insertions, 19 deletions
diff --git a/libexec/rtld-elf/malloc.c b/libexec/rtld-elf/malloc.c
index ed0d1fd..da94a55 100644
--- a/libexec/rtld-elf/malloc.c
+++ b/libexec/rtld-elf/malloc.c
@@ -147,7 +147,7 @@ botch(s)
#endif
/* Debugging stuff */
-extern void xprintf(const char *, ...);
+static void xprintf(const char *, ...);
#define TRACE() xprintf("TRACE %s:%d\n", __FILE__, __LINE__)
void *
@@ -483,3 +483,18 @@ int n;
#endif
return n;
}
+
+/*
+ * Non-mallocing printf, for use by malloc itself.
+ */
+static void
+xprintf(const char *fmt, ...)
+{
+ char buf[256];
+ va_list ap;
+
+ va_start(ap, fmt);
+ vsprintf(buf, fmt, ap);
+ (void)write(STDOUT_FILENO, buf, strlen(buf));
+ va_end(ap);
+}
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 4408d63..1febf0c 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -118,7 +118,6 @@ static void unload_object(Obj_Entry *);
static void unref_dag(Obj_Entry *);
void r_debug_state(struct r_debug*, struct link_map*);
-void xprintf(const char *, ...) __printflike(1, 2);
/*
* Data declarations.
@@ -2172,19 +2171,3 @@ unref_dag(Obj_Entry *root)
objlist_remove(&elm->obj->dldags, root);
}
}
-
-/*
- * Non-mallocing printf, for use by malloc itself.
- * XXX - This doesn't belong in this module.
- */
-void
-xprintf(const char *fmt, ...)
-{
- char buf[256];
- va_list ap;
-
- va_start(ap, fmt);
- vsprintf(buf, fmt, ap);
- (void)write(STDOUT_FILENO, buf, strlen(buf));
- va_end(ap);
-}
diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h
index b425013..274bfce 100644
--- a/libexec/rtld-elf/rtld.h
+++ b/libexec/rtld-elf/rtld.h
@@ -39,7 +39,7 @@
#include "rtld_machdep.h"
#ifndef STANDARD_LIBRARY_PATH
-#define STANDARD_LIBRARY_PATH "/usr/lib/elf:/usr/lib"
+#define STANDARD_LIBRARY_PATH "/usr/lib"
#endif
#define NEW(type) ((type *) xmalloc(sizeof(type)))
OpenPOWER on IntegriCloud