Author: kan
Date: Mon Apr  2 11:50:14 2012
New Revision: 233777
URL: http://svn.freebsd.org/changeset/base/233777

Log:
  Do not try to adjust stacks if dlopen_object is called too early.
  
  This is a follow-up to r233231, which fixed similar issue with
  object initialization code.
  
  Reviewed by:  kib
  MFC after:    1 week (with 233231)

Modified:
  head/libexec/rtld-elf/rtld.c

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c        Mon Apr  2 11:41:33 2012        
(r233776)
+++ head/libexec/rtld-elf/rtld.c        Mon Apr  2 11:50:14 2012        
(r233777)
@@ -2585,7 +2585,10 @@ dlopen_object(const char *name, int fd, 
        name);
     GDB_STATE(RT_CONSISTENT,obj ? &obj->linkmap : NULL);
 
-    map_stacks_exec(&lockstate);
+
+    if (!(lo_flags & RTLD_LO_EARLY)) {
+       map_stacks_exec(&lockstate);
+    }
 
     if (initlist_objects_ifunc(&initlist, (mode & RTLD_MODEMASK) == RTLD_NOW,
       (lo_flags & RTLD_LO_EARLY) ? SYMLOOK_EARLY : 0,
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to