about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/dl-sysdep.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-10-05 09:00:06 +0000
committerRoland McGrath <roland@gnu.org>1995-10-05 09:00:06 +0000
commit6a76c115150318eae5d02eca76f2fc03be7bd029 (patch)
tree70a777331f79484d2d72583dfda40f5125864355 /sysdeps/mach/hurd/dl-sysdep.c
parent57aefafe56f066b56031187ea26e49df076f2ac9 (diff)
downloadglibc-6a76c115150318eae5d02eca76f2fc03be7bd029.tar.gz
glibc-6a76c115150318eae5d02eca76f2fc03be7bd029.tar.xz
glibc-6a76c115150318eae5d02eca76f2fc03be7bd029.zip
Thu Oct 5 00:59:58 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
	* elf/rtld.c (dl_main): Grok --list flag.
	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start): Ignore -- args.

	* sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_message): New function.
	* sysdeps/generic/dl-sysdep.c (_dl_sysdep_message): New function.
	* elf/link.h (_dl_sysdep_message): Declare it.
Diffstat (limited to 'sysdeps/mach/hurd/dl-sysdep.c')
-rw-r--r--sysdeps/mach/hurd/dl-sysdep.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
index 2daf74957c..8e1ef174e2 100644
--- a/sysdeps/mach/hurd/dl-sysdep.c
+++ b/sysdeps/mach/hurd/dl-sysdep.c
@@ -116,7 +116,7 @@ unfmh();			/* XXX */
 	   for example "-/lib/libc.so=123" says that the contents of
 	   /lib/libc.so are found in a memory object whose port name
 	   in our task is 123.  */
-	while (_dl_argc > 2 && _dl_argv[1][0] == '-')
+	while (_dl_argc > 2 && _dl_argv[1][0] == '-' && _dl_argv[1][1] != '-')
 	  {
 	    char *lastslash, *memobjname, *p;
 	    struct link_map *l;
@@ -227,6 +227,28 @@ _dl_sysdep_fatal (const char *msg, ...)
 }
 
 
+void
+_dl_sysdep_message (const char *msg, ...)
+{
+  va_list ap;
+
+  va_start (ap, msg);
+  do
+    {
+      size_t len = strlen (msg);
+      mach_msg_type_number_t nwrote;
+      do
+	{
+	  if (__io_write (_hurd_init_dtable[1], msg, len, -1, &nwrote))
+	    break;
+	  len -= nwrote;
+	  msg += nwrote;
+	} while (nwrote > 0);
+      msg = va_arg (ap, const char *);
+    } while (msg);
+  va_end (ap);
+}
+
 /* Minimal open/close/mmap implementation sufficient for initial loading of
    shared libraries.  These are weak definitions so that when the
    dynamic linker re-relocates itself to be user-visible (for -ldl),