19 |
|
|
20 |
@end defun |
@end defun |
21 |
|
|
22 |
@defun LINK (files image &optional post extra-libs &aux raw init) |
@defun LINK (files image &optional post extra-libs (run-user-init t) &aux raw init) |
23 |
Package:LISP |
Package:LISP |
24 |
|
|
25 |
On systems where dlopen is used for relocations, one cannot make custom |
On systems where dlopen is used for relocations, one cannot make custom |
27 |
and executing save-system. This function is provided for such cases. |
and executing save-system. This function is provided for such cases. |
28 |
|
|
29 |
After compiling source files into objects, LINK can be called with a |
After compiling source files into objects, LINK can be called with a |
30 |
list of binary and source FILES which would otherwise normally be loaded |
list of binary and source FILES which would otherwise normally be |
31 |
in sequence before saving the image to IMAGE. LINK will use the system |
loaded in sequence before saving the image to IMAGE. LINK will use |
32 |
C linker to link the binary files thus supplied with GCL's objects, |
the system C linker to link the binary files thus supplied with GCL's |
33 |
using EXTRA-LIBS as well if provided, and producing a raw_IMAGE |
objects, using EXTRA-LIBS as well if provided, and producing a |
34 |
executable. This executable is then run to initialize first GCL's |
raw_IMAGE executable. This executable is then run to initialize first |
35 |
objects, and then the supplied files, in order. Source files are loaded |
GCL's objects, followed by the supplied files, in order, if |
36 |
at their position in the sequence. Any optional code which should be |
RUN-USER-INIT is set. In such a case, source files are loaded at |
37 |
run after file initialization can be supplied in the POST variable. The |
their position in the sequence. Any optional code which should be run |
38 |
|
after file initialization can be supplied in the POST variable. The |
39 |
image is then saved using save-system to IMAGE. |
image is then saved using save-system to IMAGE. |
40 |
|
|
41 |
This method of creating lisp images may also have the advantage that all |
This method of creating lisp images may also have the advantage that |
42 |
new object files are kept out of the lisp core and placed instead in the |
all new object files are kept out of the lisp core and placed instead |
43 |
final image's .text section. This should in principle reduce the core |
in the final image's .text section. This should in principle reduce |
44 |
size and speed up garbage collection. |
the core size, speed up garbage collection, and forego any performance |
45 |
|
penalty induced by data cache flushing on some machines. |
46 |
|
|
47 |
|
|
48 |
|
In both the RAW and SAVED image, any calls to LOAD binary object files |
49 |
|
which have been specified in this list will bypass the normal load |
50 |
|
procedure, and simply initialize the already linked in module. One |
51 |
|
can rely on this feature by disabling RUN-USER-INIT, and instead |
52 |
|
passing the normal build commands in POST. In the course of executing |
53 |
|
this code, binary modules previously linked into the .text section of |
54 |
|
the executable will be initialized at the same point at which they |
55 |
|
would have normally been loaded into the lisp core, in the |
56 |
|
executable's .data section. In this way, the user can choose to take |
57 |
|
advantage of the aforementioned possible benefits of this linking |
58 |
|
method in a relatively transparent way. |
59 |
|
|
60 |
|
All binary objects specified in FILES must have been compiled with |
61 |
|
:SYSTEM-P set to T. |
62 |
|
|
63 |
@end defun |
@end defun |
64 |
|
|
229 |
|
|
230 |
@end defun |
@end defun |
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
@defun COMPILED-FUNCTION-P (x) |
@defun COMPILED-FUNCTION-P (x) |
233 |
Package:LISP |
Package:LISP |
234 |
|
|
237 |
|
|
238 |
@end defun |
@end defun |
239 |
|
|
240 |
|
@defvar *DEFAULT-SYSTEM-P* |
241 |
|
Pakcage:COMPILER |
242 |
|
Specifies the default setting of :SYSTEM-P used by COMPILE. Defaults to NIL. |
243 |
|
@end defvar |
244 |
|
|
245 |
|
@defvar *DEFAULT-C-FILE* |
246 |
|
Pakcage:COMPILER |
247 |
|
Specifies the default setting of :C-FILE used by COMPILE. Defaults to NIL. |
248 |
|
@end defvar |
249 |
|
|
250 |
|
@defvar *DEFAULT-H-FILE* |
251 |
|
Pakcage:COMPILER |
252 |
|
Specifies the default setting of :H-FILE used by COMPILE. Defaults to NIL. |
253 |
|
@end defvar |
254 |
|
|
255 |
|
@defvar *DEFAULT-DATA-FILE* |
256 |
|
Pakcage:COMPILER |
257 |
|
Specifies the default setting of :DATA-FILE used by COMPILE. Defaults to NIL. |
258 |
|
@end defvar |
259 |
|
|
260 |
@defvar *FEATURES* |
@defvar *FEATURES* |
261 |
Package:LISP |
Package:LISP |