Print this page
10908 Simplify SMAP relocations with krtld

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/os/modctl.c
          +++ new/usr/src/uts/common/os/modctl.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
       24 + * Copyright (c) 2017 Joyent, Inc.
  24   25   */
  25   26  
  26   27  /*
  27   28   * modctl system call for loadable module support.
  28   29   */
  29   30  
  30   31  #include <sys/param.h>
  31   32  #include <sys/user.h>
  32   33  #include <sys/systm.h>
  33   34  #include <sys/exec.h>
↓ open down ↓ 3429 lines elided ↑ open up ↑
3463 3464                   */
3464 3465                  if ((cluster_bootflags & CLUSTER_BOOTED) && !modrootloaded) {
3465 3466                          retval = clboot_modload(mp);
3466 3467                  }
3467 3468  
3468 3469                  kmem_free(modinfop, sizeof (struct modinfo));
3469 3470                  (void) mod_sysctl(SYS_SET_MVAR, (void *)mp);
3470 3471                  retval = install_stubs_by_name(mp, mp->mod_modname);
3471 3472  
3472 3473                  /*
     3474 +                 * Perform hotinlines before module is started.
     3475 +                 */
     3476 +                do_hotinlines(mp->mod_mp);
     3477 +
     3478 +                /*
3473 3479                   * Now that the module is loaded, we need to give DTrace
3474 3480                   * a chance to notify its providers.  This is done via
3475 3481                   * the dtrace_modload function pointer.
3476 3482                   */
3477 3483                  if (strcmp(mp->mod_modname, "dtrace") != 0) {
3478 3484                          struct modctl *dmp = mod_hold_by_name("dtrace");
3479 3485  
3480 3486                          if (dmp != NULL && dtrace_modload != NULL)
3481 3487                                  (*dtrace_modload)(mp);
3482 3488  
↓ open down ↓ 1353 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX