| 1 |
(* M2RTS.mod implement the smallest number of routines for linking. |
| 2 |
|
| 3 |
Copyright (C) 2001-2025 Free Software Foundation, Inc. |
| 4 |
Contributed by Gaius Mulley <[email protected]>. |
| 5 |
|
| 6 |
This file is part of GNU Modula-2. |
| 7 |
|
| 8 |
GNU Modula-2 is free software; you can redistribute it and/or modify |
| 9 |
it under the terms of the GNU General Public License as published by |
| 10 |
the Free Software Foundation; either version 3, or (at your option) |
| 11 |
any later version. |
| 12 |
|
| 13 |
GNU Modula-2 is distributed in the hope that it will be useful, but |
| 14 |
WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
General Public License for more details. |
| 17 |
|
| 18 |
Under Section 7 of GPL version 3, you are granted additional |
| 19 |
permissions described in the GCC Runtime Library Exception, version |
| 20 |
3.1, as published by the Free Software Foundation. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License and |
| 23 |
a copy of the GCC Runtime Library Exception along with this program; |
| 24 |
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see |
| 25 |
<http://www.gnu.org/licenses/>. *) |
| 26 |
|
| 27 |
IMPLEMENTATION MODULE M2RTS ; |
| 28 |
|
| 29 |
IMPORT libc, SYSTEM ; |
| 30 |
(* we reference these to ensure they are dragged in to the link *) |
| 31 |
|
| 32 |
|
| 33 |
PROCEDURE ConstructModules (applicationmodule, libname: ADDRESS; |
| 34 |
argc: INTEGER; argv, envp: ADDRESS) ; |
| 35 |
BEGIN |
| 36 |
END ConstructModules ; |
| 37 |
|
| 38 |
|
| 39 |
PROCEDURE DeconstructModules (applicationmodule, libname: ADDRESS; |
| 40 |
argc: INTEGER; argv, envp: ADDRESS) ; |
| 41 |
BEGIN |
| 42 |
END DeconstructModules ; |
| 43 |
|
| 44 |
|
| 45 |
(* |
| 46 |
RegisterModule - adds module name to the list of outstanding |
| 47 |
modules which need to have their dependencies |
| 48 |
explored to determine initialization order. |
| 49 |
*) |
| 50 |
|
| 51 |
PROCEDURE RegisterModule (name, libname: ADDRESS; |
| 52 |
init, fini: ArgCVEnvP; |
| 53 |
dependencies: PROC) ; |
| 54 |
BEGIN |
| 55 |
END RegisterModule ; |
| 56 |
|
| 57 |
|
| 58 |
(* all these procedures do nothing except satisfy the linker. *) |
| 59 |
|
| 60 |
PROCEDURE ExecuteTerminationProcedures ; |
| 61 |
BEGIN |
| 62 |
END ExecuteTerminationProcedures ; |
| 63 |
|
| 64 |
|
| 65 |
PROCEDURE ExecuteInitialProcedures ; |
| 66 |
BEGIN |
| 67 |
END ExecuteInitialProcedures ; |
| 68 |
|
| 69 |
|
| 70 |
PROCEDURE HALT ; |
| 71 |
BEGIN |
| 72 |
LOOP |
| 73 |
END |
| 74 |
END HALT ; |
| 75 |
|
| 76 |
|
| 77 |
PROCEDURE NoException (filename: ADDRESS; |
| 78 |
line, column: CARDINAL; scope, message: ADDRESS) ; |
| 79 |
BEGIN |
| 80 |
END NoException ; |
| 81 |
|
| 82 |
|
| 83 |
(* |
| 84 |
RequestDependant - used to specify that modulename is dependant upon |
| 85 |
module dependantmodule. |
| 86 |
*) |
| 87 |
|
| 88 |
PROCEDURE RequestDependant (modulename, libname, |
| 89 |
dependantmodule, dependantlibname: ADDRESS) ; |
| 90 |
BEGIN |
| 91 |
END RequestDependant ; |
| 92 |
|
| 93 |
|
| 94 |
END M2RTS. |