Author: kib
Date: Mon Oct 29 23:56:39 2018
New Revision: 339896
URL: https://svnweb.freebsd.org/changeset/base/339896

Log:
  Initialize ifunc calling machinery earlier.
  
  In particular, do it before the first call to allocate_initial_tls(),
  which contains MD parts to set the initial thread' TLS pointer.
  
  Sponsored by: The FreeBSD Foundation
  MFC after:    1 week

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

Modified: head/libexec/rtld-elf/rtld.c
==============================================================================
--- head/libexec/rtld-elf/rtld.c        Mon Oct 29 23:52:31 2018        
(r339895)
+++ head/libexec/rtld-elf/rtld.c        Mon Oct 29 23:56:39 2018        
(r339896)
@@ -709,6 +709,8 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr
        exit (0);
     }
 
+    ifunc_init(aux);
+
     /*
      * Setup TLS for main thread.  This must be done after the
      * relocations are processed, since tls initialization section
@@ -730,7 +732,6 @@ _rtld(Elf_Addr *sp, func_ptr_type *exit_proc, Obj_Entr
     r_debug_state(NULL, &obj_main->linkmap); /* say hello to gdb! */
 
     map_stacks_exec(NULL);
-    ifunc_init(aux);
 
     dbg("resolving ifuncs");
     if (resolve_objects_ifunc(obj_main,
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to