00db10
commit a1b85ae88b1a664e93ca0182c82f7763dd5a1754
00db10
Author: Florian Weimer <fweimer@redhat.com>
00db10
Date:   Mon Nov 9 16:52:31 2015 +0100
00db10
00db10
    ld.so: Add original DSO name if overridden by audit module [BZ #18251]
00db10
00db10
Index: b/elf/Makefile
00db10
===================================================================
00db10
--- a/elf/Makefile
00db10
+++ b/elf/Makefile
00db10
@@ -119,7 +119,8 @@ $(inst_auditdir)/sotruss-lib.so: $(objpf
00db10
 endif
00db10
 
00db10
 tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1 \
00db10
-	tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
00db10
+	tst-array1 tst-array2 tst-array3 tst-array4 tst-array5 \
00db10
+	tst-audit11 tst-audit12
00db10
 tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static \
00db10
 	       tst-leaks1-static tst-array1-static tst-array5-static \
00db10
 	       tst-ptrguard1-static
00db10
@@ -216,7 +217,9 @@ modules-names = testobj1 testobj2 testob
00db10
 		tst-initorder2a tst-initorder2b tst-initorder2c \
00db10
 		tst-initorder2d \
00db10
 		tst-relsort1mod1 tst-relsort1mod2 tst-array2dep \
00db10
-		tst-array5dep
00db10
+		tst-array5dep \
00db10
+		tst-audit11mod1 tst-audit11mod2 tst-auditmod11 \
00db10
+		tst-audit12mod1 tst-audit12mod2 tst-audit12mod3 tst-auditmod12
00db10
 ifeq (yesyes,$(have-fpie)$(build-shared))
00db10
 modules-names += tst-piemod1
00db10
 tests += tst-pie1
00db10
@@ -1210,3 +1213,15 @@ $(objpfx)tst-unused-dep.out: $(objpfx)te
00db10
 	  --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \
00db10
 	  $< > $@
00db10
 	cmp $@ /dev/null > /dev/null
00db10
+
00db10
+$(objpfx)tst-audit11.out: $(objpfx)tst-auditmod11.so $(objpfx)tst-audit11mod1.so
00db10
+$(objpfx)tst-audit11: $(libdl)
00db10
+tst-audit11-ENV = LD_AUDIT=$(objpfx)tst-auditmod11.so
00db10
+$(objpfx)tst-audit11mod1.so: $(objpfx)tst-audit11mod2.so
00db10
+LDFLAGS-tst-audit11mod2.so = -Wl,--version-script=tst-audit11mod2.map,-soname,tst-audit11mod2.so
00db10
+
00db10
+$(objpfx)tst-audit12.out: $(objpfx)tst-auditmod12.so $(objpfx)tst-audit12mod1.so $(objpfx)tst-audit12mod3.so
00db10
+$(objpfx)tst-audit12: $(libdl)
00db10
+tst-audit12-ENV = LD_AUDIT=$(objpfx)tst-auditmod12.so
00db10
+$(objpfx)tst-audit12mod1.so: $(objpfx)tst-audit12mod2.so
00db10
+LDFLAGS-tst-audit12mod2.so = -Wl,--version-script=tst-audit12mod2.map
00db10
Index: b/elf/dl-load.c
00db10
===================================================================
00db10
--- a/elf/dl-load.c
00db10
+++ b/elf/dl-load.c
00db10
@@ -909,9 +909,10 @@ lose (int code, int fd, const char *name
00db10
 static
00db10
 #endif
00db10
 struct link_map *
00db10
-_dl_map_object_from_fd (const char *name, int fd, struct filebuf *fbp,
00db10
-			char *realname, struct link_map *loader, int l_type,
00db10
-			int mode, void **stack_endp, Lmid_t nsid)
00db10
+_dl_map_object_from_fd (const char *name, const char *origname, int fd,
00db10
+			struct filebuf *fbp, char *realname,
00db10
+			struct link_map *loader, int l_type, int mode,
00db10
+			void **stack_endp, Lmid_t nsid)
00db10
 {
00db10
   struct link_map *l = NULL;
00db10
   const ElfW(Ehdr) *header;
00db10
@@ -1582,6 +1583,17 @@ cannot enable executable stack as shared
00db10
   l->l_dev = st.st_dev;
00db10
   l->l_ino = st.st_ino;
00db10
 
00db10
+#ifdef SHARED
00db10
+  /* When auditing is used the recorded names might not include the
00db10
+     name by which the DSO is actually known.  Add that as well.  */
00db10
+  if (__glibc_unlikely (origname != NULL))
00db10
+    add_name_to_object (l, origname);
00db10
+#else
00db10
+  /* Audit modules only exist when linking is dynamic so ORIGNAME
00db10
+     cannot be non-NULL.  */
00db10
+  assert (origname == NULL);
00db10
+#endif
00db10
+
00db10
   /* When we profile the SONAME might be needed for something else but
00db10
      loading.  Add it right away.  */
00db10
   if (__builtin_expect (GLRO(dl_profile) != NULL, 0)
00db10
@@ -2081,6 +2093,7 @@ _dl_map_object (struct link_map *loader,
00db10
 		int type, int trace_mode, int mode, Lmid_t nsid)
00db10
 {
00db10
   int fd;
00db10
+  const char *origname = NULL;
00db10
   char *realname;
00db10
   char *name_copy;
00db10
   struct link_map *l;
00db10
@@ -2144,6 +2157,7 @@ _dl_map_object (struct link_map *loader,
00db10
 	{
00db10
 	  if (afct->objsearch != NULL)
00db10
 	    {
00db10
+	      const char *before = name;
00db10
 	      name = afct->objsearch (name, &loader->l_audit[cnt].cookie,
00db10
 				      LA_SER_ORIG);
00db10
 	      if (name == NULL)
00db10
@@ -2152,6 +2166,15 @@ _dl_map_object (struct link_map *loader,
00db10
 		  fd = -1;
00db10
 		  goto no_file;
00db10
 		}
00db10
+	      if (before != name && strcmp (before, name) != 0)
00db10
+		{
00db10
+		  if (__glibc_unlikely (GLRO(dl_debug_mask) & DL_DEBUG_FILES))
00db10
+		    _dl_debug_printf ("audit changed filename %s -> %s\n",
00db10
+				      before, name);
00db10
+
00db10
+		  if (origname == NULL)
00db10
+		    origname = before;
00db10
+		}
00db10
 	    }
00db10
 
00db10
 	  afct = afct->next;
00db10
@@ -2371,8 +2394,8 @@ _dl_map_object (struct link_map *loader,
00db10
     }
00db10
 
00db10
   void *stack_end = __libc_stack_end;
00db10
-  return _dl_map_object_from_fd (name, fd, &fb, realname, loader, type, mode,
00db10
-				 &stack_end, nsid);
00db10
+  return _dl_map_object_from_fd (name, origname, fd, &fb, realname, loader,
00db10
+				 type, mode, &stack_end, nsid);
00db10
 }
00db10
 
00db10
 
00db10
Index: b/elf/tst-audit11.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit11.c
00db10
@@ -0,0 +1,36 @@
00db10
+/* Test version symbol binding can find a DSO replaced by la_objsearch.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#include <dlfcn.h>
00db10
+#include <stdio.h>
00db10
+
00db10
+int
00db10
+do_test (void)
00db10
+{
00db10
+  puts ("Start");
00db10
+  if (dlopen ("$ORIGIN/tst-audit11mod1.so", RTLD_LAZY) == NULL)
00db10
+    {
00db10
+      printf ("module not loaded: %s\n", dlerror ());
00db10
+      return 1;
00db10
+    }
00db10
+  puts ("OK");
00db10
+  return 0;
00db10
+}
00db10
+
00db10
+#define TEST_FUNCTION do_test ()
00db10
+#include "../test-skeleton.c"
00db10
Index: b/elf/tst-audit11mod1.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit11mod1.c
00db10
@@ -0,0 +1,24 @@
00db10
+/* DSO directly opened by tst-audit11.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+extern int f2 (void);
00db10
+int
00db10
+f1 (void)
00db10
+{
00db10
+  return f2 ();
00db10
+}
00db10
Index: b/elf/tst-audit11mod2.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit11mod2.c
00db10
@@ -0,0 +1,23 @@
00db10
+/* DSO indirectly opened by tst-audit11, with symbol versioning.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+int
00db10
+f2 (void)
00db10
+{
00db10
+  return 42;
00db10
+}
00db10
Index: b/elf/tst-audit11mod2.map
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit11mod2.map
00db10
@@ -0,0 +1,22 @@
00db10
+/* Symbol versioning for the DSO indirectly opened by tst-audit11.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+V1 {
00db10
+  global: f2;
00db10
+  local: *;
00db10
+};
00db10
Index: b/elf/tst-audit12.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit12.c
00db10
@@ -0,0 +1,49 @@
00db10
+/* Test that symbol is bound to a DSO replaced by la_objsearch.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#include <dlfcn.h>
00db10
+#include <stdio.h>
00db10
+
00db10
+int
00db10
+do_test (void)
00db10
+{
00db10
+  puts ("Start");
00db10
+  void *h = dlopen ("$ORIGIN/tst-audit12mod1.so", RTLD_LAZY);
00db10
+  if (h == NULL)
00db10
+    {
00db10
+      printf ("module not loaded: %s\n", dlerror ());
00db10
+      return 1;
00db10
+    }
00db10
+  int (*fp) (void) = (int (*) (void)) dlsym (h, "f1");
00db10
+  if (fp == NULL)
00db10
+    {
00db10
+      printf ("function f1 not found: %s\n", dlerror ());
00db10
+      return 1;
00db10
+    }
00db10
+  int res = fp ();
00db10
+  if (res != 43)
00db10
+    {
00db10
+      puts ("incorrect function f2 called");
00db10
+      return 1;
00db10
+    }
00db10
+  printf ("%d is OK\n", res);
00db10
+  return 0;
00db10
+}
00db10
+
00db10
+#define TEST_FUNCTION do_test ()
00db10
+#include "../test-skeleton.c"
00db10
Index: b/elf/tst-audit12mod1.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit12mod1.c
00db10
@@ -0,0 +1,24 @@
00db10
+/* DSO directly opened by tst-audit12.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+extern int f2 (void);
00db10
+int
00db10
+f1 (void)
00db10
+{
00db10
+  return f2 ();
00db10
+}
00db10
Index: b/elf/tst-audit12mod2.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit12mod2.c
00db10
@@ -0,0 +1,23 @@
00db10
+/* Replaced DSO referenced by tst-audit12mod1.so, for tst-audit12.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+int
00db10
+f2 (void)
00db10
+{
00db10
+  return 42;
00db10
+}
00db10
Index: b/elf/tst-audit12mod2.map
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit12mod2.map
00db10
@@ -0,0 +1,22 @@
00db10
+/* Symbol versioning for tst-audit12mod2.so used by tst-audit12.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+V1 {
00db10
+  global: f2;
00db10
+  local: *;
00db10
+};
00db10
Index: b/elf/tst-audit12mod3.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-audit12mod3.c
00db10
@@ -0,0 +1,23 @@
00db10
+/* Replacement DSO loaded by the audit module, for tst-audit12.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+int
00db10
+f2 (void)
00db10
+{
00db10
+  return 43;
00db10
+}
00db10
Index: b/elf/tst-auditmod11.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-auditmod11.c
00db10
@@ -0,0 +1,39 @@
00db10
+/* Audit module for tst-audit11.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#include <link.h>
00db10
+#include <stdio.h>
00db10
+#include <stdlib.h>
00db10
+#include <string.h>
00db10
+#include <unistd.h>
00db10
+
00db10
+unsigned int
00db10
+la_version (unsigned int version)
00db10
+{
00db10
+  return version;
00db10
+}
00db10
+
00db10
+char *
00db10
+la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag)
00db10
+{
00db10
+  if (strcmp (name, "tst-audit11mod2.so") == 0)
00db10
+    {
00db10
+      return (char *) "$ORIGIN/tst-audit11mod2.so";
00db10
+    }
00db10
+  return (char *) name;
00db10
+}
00db10
Index: b/elf/tst-auditmod12.c
00db10
===================================================================
00db10
--- /dev/null
00db10
+++ b/elf/tst-auditmod12.c
00db10
@@ -0,0 +1,43 @@
00db10
+/* Audit module for tst-audit12.
00db10
+   Copyright (C) 2015 Free Software Foundation, Inc.
00db10
+   This file is part of the GNU C Library.
00db10
+
00db10
+   The GNU C Library is free software; you can redistribute it and/or
00db10
+   modify it under the terms of the GNU Lesser General Public
00db10
+   License as published by the Free Software Foundation; either
00db10
+   version 2.1 of the License, or (at your option) any later version.
00db10
+
00db10
+   The GNU C Library is distributed in the hope that it will be useful,
00db10
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
00db10
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00db10
+   Lesser General Public License for more details.
00db10
+
00db10
+   You should have received a copy of the GNU Lesser General Public
00db10
+   License along with the GNU C Library; if not, see
00db10
+   <http://www.gnu.org/licenses/>.  */
00db10
+
00db10
+#include <link.h>
00db10
+#include <stdio.h>
00db10
+#include <stdlib.h>
00db10
+#include <string.h>
00db10
+#include <unistd.h>
00db10
+
00db10
+unsigned int
00db10
+la_version (unsigned int version)
00db10
+{
00db10
+  return version;
00db10
+}
00db10
+
00db10
+char *
00db10
+la_objsearch (const char *name, uintptr_t *cookie, unsigned int flag)
00db10
+{
00db10
+  const char target[] = "tst-audit12mod2.so";
00db10
+
00db10
+  size_t namelen = strlen (name);
00db10
+  if (namelen >= sizeof (target) - 1
00db10
+      && strcmp (name + namelen - (sizeof (target) - 1), target) == 0)
00db10
+    {
00db10
+      return (char *) "$ORIGIN/tst-audit12mod3.so";
00db10
+    }
00db10
+  return (char *) name;
00db10
+}
00db10
Index: b/sysdeps/mach/hurd/dl-sysdep.c
00db10
===================================================================
00db10
--- a/sysdeps/mach/hurd/dl-sysdep.c
00db10
+++ b/sysdeps/mach/hurd/dl-sysdep.c
00db10
@@ -187,7 +187,7 @@ unfmh();			/* XXX */
00db10
 	    assert_perror (err);
00db10
 
00db10
 	    lastslash = strrchr (p, '/');
00db10
-	    l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p,
00db10
+	    l = _dl_map_object_from_fd (lastslash ? lastslash + 1 : p, NULL,
00db10
 					memobj, strdup (p), 0);
00db10
 
00db10
 	    /* Squirrel away the memory object port where it