--- glibc-2.3.4/elf/dl-load.c	2004-12-12 15:49:28.000000000 -0500
+++ glibc-2.3.4/elf/dl-load.c	2005-04-05 22:50:10.000000000 -0400
@@ -1788,6 +1793,11 @@
 	 must not be freed using the general free() in libc.  */
       if (sps->malloced)
 	free (sps->dirs);
+#ifdef HAVE_Z_RELRO
+      /* rtld_search_dirs is attribute_relro, therefore avoid writing
+	 into it.  */
+      if (sps != &rtld_search_dirs)
+#endif
       sps->dirs = (void *) -1;
     }
 
