Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/libexec/ld.elf_so pullup 1.3->1.4 (klienk): LD_PRELOAD ...
details: https://anonhg.NetBSD.org/src/rev/3edfae2fd3f0
branches: netbsd-1-4
changeset: 468930:3edfae2fd3f0
user: perry <perry%NetBSD.org@localhost>
date: Wed Jun 23 15:04:09 1999 +0000
description:
pullup 1.3->1.4 (klienk): LD_PRELOAD support
diffstat:
libexec/ld.elf_so/load.c | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diffs (38 lines):
diff -r 959fd5386b96 -r 3edfae2fd3f0 libexec/ld.elf_so/load.c
--- a/libexec/ld.elf_so/load.c Wed Jun 23 15:00:57 1999 +0000
+++ b/libexec/ld.elf_so/load.c Wed Jun 23 15:04:09 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: load.c,v 1.3 1999/03/01 16:40:07 christos Exp $ */
+/* $NetBSD: load.c,v 1.3.2.1 1999/06/23 15:04:09 perry Exp $ */
/*
* Copyright 1996 John D. Polstra.
@@ -142,3 +142,28 @@
return status;
}
+
+#ifdef RTLD_LOADER
+int
+_rtld_preload(preload_path, dodebug)
+ const char *preload_path;
+ bool dodebug;
+{
+ const char *path;
+ char *cp, *buf;
+ int status = 0;
+
+ if (preload_path != NULL) {
+ cp = buf = xstrdup(preload_path);
+ while ((path = strsep(&cp, " ")) != NULL && status == 0) {
+ if (_rtld_load_object(xstrdup(path), dodebug) == NULL)
+ status = -1;
+ else if (dodebug)
+ dbg((" preloaded \"%s\"", path));
+ }
+ free(buf);
+ }
+
+ return (status);
+}
+#endif
Home |
Main Index |
Thread Index |
Old Index