Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
e726b100
Commit
e726b100
authored
14 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
No functional changes. Just update and clarify comments.
parent
066d6439
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lisp/lisp.c
+41
-23
41 additions, 23 deletions
lisp/lisp.c
with
41 additions
and
23 deletions
lisp/lisp.c
+
41
−
23
View file @
e726b100
/*
/*
* main() entry point for a stand alone lisp image.
* main() entry point for a stand alone lisp image.
*
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.7
5
2010/08/01 1
2:32:11 agoncharov
Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.7
6
2010/08/01 1
4:47:14 rtoy
Exp $
*
*
*/
*/
...
@@ -375,19 +375,32 @@ prepend_core_path(const char *lib, const char *corefile)
...
@@ -375,19 +375,32 @@ prepend_core_path(const char *lib, const char *corefile)
}
}
/*
/*
The symbol builtin_image_flag is used globally as a flag to indicate
* The value of the variable builtin_image_flag indicate whther the
whether the executable contains the lisp image. Note that we use
* executable contains the lisp image or not. The variable
the linker to set the value of the symbol. But the symbol is an
* initial_function_addr indicates the address of the initial
address, not a variable value. So for this to work as a flag, it
* function. How these are interpreted depends on the system.
must end up pointing to a valid place in memory or we'll get a bus
*
error or segmentation violation when we check it. If the lisp image
* For Linux/x86, Darwin/x86, and Solaris/sparc, the
is built in, we'll set this symbol to point to the beginning of the
* builtin_image_flag is a normal symbol mapped into a normal data
process.
* area. If true, the executable contains the lisp image. Likewise,
* initial_function_addr is a symbol mapped into a normal data area.
We also use the linker to set initial_function_addr so that if the
* The value of this variable is the address of the initial function.
lisp core is built in, taking the address of initial_function_addr
*
will give the address of the initial function.
* For other systems, we use the linker to set the value of the symbol.
*/
* But the symbol is an address, not a variable value. So for this to
* work as a flag, it must end up pointing to a valid place in memory
* or we'll get a bus error or segmentation violation when we check
* it. If the lisp image is built in, we'll set this symbol to point
* to the beginning of the process.
*
* We also use the linker to set initial_function_addr so that if the
* lisp core is built in, taking the address of initial_function_addr
* will give the address of the initial function.
*
* The details of how these variables are set up are in
* tools/linker.sh and tools/linker-x86.sh. Which script is used is
* set in src/lisp/elf.h.
*/
extern
int
builtin_image_flag
;
extern
int
builtin_image_flag
;
extern
long
initial_function_addr
;
extern
long
initial_function_addr
;
...
@@ -618,9 +631,11 @@ main(int argc, const char *argv[], const char *envp[])
...
@@ -618,9 +631,11 @@ main(int argc, const char *argv[], const char *envp[])
cmucllib
=
strdup
(
libvar
);
cmucllib
=
strdup
(
libvar
);
}
else
}
else
#if defined FEATURE_EXECUTABLE
#if defined FEATURE_EXECUTABLE
/* The following doesn't make sense for executables.
/*
They need to use the saved library path from the
* The following doesn't make sense for executables. They
lisp from which they were dumped. */
* need to use the saved library path from the lisp from
* which they were dumped.
*/
if
(
builtin_image_flag
==
0
)
if
(
builtin_image_flag
==
0
)
#endif
#endif
{
{
...
@@ -679,8 +694,10 @@ main(int argc, const char *argv[], const char *envp[])
...
@@ -679,8 +694,10 @@ main(int argc, const char *argv[], const char *envp[])
}
}
#if defined FEATURE_EXECUTABLE
#if defined FEATURE_EXECUTABLE
}
else
{
}
else
{
/* The "core file" is the executable. We have to save the
/*
* executable path because we operate on the executable file later.
* The "core file" is the executable. We have to save the
* executable path because we operate on the executable file
* later.
*/
*/
core
=
argv
[
0
];
core
=
argv
[
0
];
}
}
...
@@ -755,10 +772,11 @@ main(int argc, const char *argv[], const char *envp[])
...
@@ -755,10 +772,11 @@ main(int argc, const char *argv[], const char *envp[])
/* Set cmucllib and cmuclcore appropriately */
/* Set cmucllib and cmuclcore appropriately */
#if defined FEATURE_EXECUTABLE
#if defined FEATURE_EXECUTABLE
/* This test will preserve the library: search list dumped
/*
with the executable unless the user specifically overrides
* This test will preserve the library: search list dumped with
it with the -lib flag or by setting the CMUCLLIB environment
* the executable unless the user specifically overrides it with
variable. */
* the -lib flag or by setting the CMUCLLIB environment variable.
*/
if
(
cmucllib
)
if
(
cmucllib
)
#endif
#endif
SetSymbolValue
(
CMUCL_LIB
,
alloc_string
(
cmucllib
));
SetSymbolValue
(
CMUCL_LIB
,
alloc_string
(
cmucllib
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment