Print this page
de-linting of .s files


   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2019 Joyent, Inc.
  25  */
  26 
  27 #include <sys/asm_linkage.h>
  28 
  29 #if defined(__lint)
  30 
  31 char stubs_base[1], stubs_end[1];
  32 
  33 #else   /* __lint */
  34 
  35 #include "assym.h"
  36 
  37 /*
  38  * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
  39  *
  40  *      For functions which are either STUBs or WSTUBs the actual function
  41  *      need to be called using 'call' instruction because of preamble and
  42  *      postamble (i.e mod_hold_stub and mod_release_stub) around the
  43  *      function call. Due to this we need to copy arguments for the
  44  *      real function. On Intel we can't tell how many arguments are there
  45  *      on the stack so we have to either copy everything between esp and
  46  *      ebp or copy only a fixed number (MAXNARG - defined here) for
  47  *      all the stub functions. Currently we are using MAXNARG (it is a kludge
  48  *      but worth it?!).
  49  *
  50  *      NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is
  51  *            loaded.
  52  */
  53 #define MAXNARG 10
  54 


1288         STUB(elfexec, mapexec32_brand,  nomod_einval);
1289         END_MODULE(elfexec);
1290 #endif
1291 
1292 /*
1293  * Stub(s) for APIX module.
1294  */
1295 #ifndef APIX_MODULE
1296         MODULE(apix,mach);
1297         WSTUB(apix, apix_loaded, nomod_zero);
1298         END_MODULE(apix);
1299 #endif
1300 
1301 /*
1302  * this is just a marker for the area of text that contains stubs
1303  */
1304 
1305         ENTRY_NP(stubs_end)
1306         nop
1307 
1308 #endif  /* lint */


   9  * or http://www.opensolaris.org/os/licensing.
  10  * See the License for the specific language governing permissions
  11  * and limitations under the License.
  12  *
  13  * When distributing Covered Code, include this CDDL HEADER in each
  14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15  * If applicable, add the following below this CDDL HEADER, with the
  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 
  22 /*
  23  * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
  24  * Copyright 2019 Joyent, Inc.
  25  */
  26 
  27 #include <sys/asm_linkage.h>
  28 






  29 #include "assym.h"
  30 
  31 /*
  32  * !!!!!!!! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! !!!!!!!!
  33  *
  34  *      For functions which are either STUBs or WSTUBs the actual function
  35  *      need to be called using 'call' instruction because of preamble and
  36  *      postamble (i.e mod_hold_stub and mod_release_stub) around the
  37  *      function call. Due to this we need to copy arguments for the
  38  *      real function. On Intel we can't tell how many arguments are there
  39  *      on the stack so we have to either copy everything between esp and
  40  *      ebp or copy only a fixed number (MAXNARG - defined here) for
  41  *      all the stub functions. Currently we are using MAXNARG (it is a kludge
  42  *      but worth it?!).
  43  *
  44  *      NOTE: Use NO_UNLOAD_STUBs if the module is NOT unloadable once it is
  45  *            loaded.
  46  */
  47 #define MAXNARG 10
  48 


1282         STUB(elfexec, mapexec32_brand,  nomod_einval);
1283         END_MODULE(elfexec);
1284 #endif
1285 
1286 /*
1287  * Stub(s) for APIX module.
1288  */
1289 #ifndef APIX_MODULE
1290         MODULE(apix,mach);
1291         WSTUB(apix, apix_loaded, nomod_zero);
1292         END_MODULE(apix);
1293 #endif
1294 
1295 /*
1296  * this is just a marker for the area of text that contains stubs
1297  */
1298 
1299         ENTRY_NP(stubs_end)
1300         nop
1301