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
03dc5a7e
Commit
03dc5a7e
authored
17 years ago
by
fgilham
Browse files
Options
Downloads
Patches
Plain Diff
Incorporate Lisp executable changes
parent
9256fd1a
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
+21
-14
21 additions, 14 deletions
lisp/lisp.c
with
21 additions
and
14 deletions
lisp/lisp.c
+
21
−
14
View file @
03dc5a7e
/*
/*
* 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.5
2
2007/07/0
6 08:04:39 cshapiro
Exp $
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/lisp.c,v 1.5
3
2007/07/0
7 15:54:31 fgilham
Exp $
*
*
*/
*/
...
@@ -35,6 +35,9 @@
...
@@ -35,6 +35,9 @@
#include
"core.h"
#include
"core.h"
#include
"save.h"
#include
"save.h"
#include
"lispregs.h"
#include
"lispregs.h"
#ifdef EXECUTABLE
#include
"elf.h"
#endif
...
@@ -432,26 +435,25 @@ main(int argc, char *argv[], char *envp[])
...
@@ -432,26 +435,25 @@ main(int argc, char *argv[], char *envp[])
argptr
=
argv
;
argptr
=
argv
;
while
((
arg
=
*++
argptr
)
!=
NULL
)
{
while
((
arg
=
*++
argptr
)
!=
NULL
)
{
if
(
strcmp
(
arg
,
"-core"
)
==
0
)
{
if
(
strcmp
(
arg
,
"-core"
)
==
0
)
{
#ifdef EXECUTABLE
if
(
builtin_image_flag
)
{
if
(
builtin_image_flag
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"Cannot specify alternate core file with executable image.
\n
"
);
"Cannot specify core file in executable image --- sorry about that.
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
#endif
if
(
core
!=
NULL
)
{
if
(
core
!=
NULL
)
{
fprintf
(
stderr
,
"can only specify one core file.
\n
"
);
fprintf
(
stderr
,
"can only specify one core file.
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
core
=
*++
argptr
;
core
=
*++
argptr
;
if
(
core
==
NULL
)
{
if
(
core
==
NULL
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"-core must be followed by the name of the core file to use.
\n
"
);
"-core must be followed by the name of the core file to use.
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
}
else
if
(
strcmp
(
arg
,
"-lib"
)
==
0
)
{
}
else
if
(
strcmp
(
arg
,
"-lib"
)
==
0
)
{
lib
=
*++
argptr
;
lib
=
*++
argptr
;
if
(
lib
==
NULL
)
{
if
(
lib
==
NULL
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"-lib must be followed by a string denoting the CMUCL library path.
\n
"
);
"-lib must be followed by a string denoting the CMUCL library path.
\n
"
);
exit
(
1
);
exit
(
1
);
}
}
}
else
if
(
strcmp
(
arg
,
"-dynamic-space-size"
)
==
0
)
{
}
else
if
(
strcmp
(
arg
,
"-dynamic-space-size"
)
==
0
)
{
...
@@ -492,8 +494,7 @@ main(int argc, char *argv[], char *envp[])
...
@@ -492,8 +494,7 @@ main(int argc, char *argv[], char *envp[])
}
}
#endif
#endif
if
(
dynamic_space_size
>
DYNAMIC_SPACE_SIZE
)
{
if
(
dynamic_space_size
>
DYNAMIC_SPACE_SIZE
)
{
fprintf
(
stderr
,
fprintf
(
stderr
,
"-dynamic-space-size must be no greater than %d MBytes.
\n
"
,
"-dynamic-space-size must be no greater than %d MBytes.
\n
"
,
DYNAMIC_SPACE_SIZE
/
(
1024
*
1024
));
DYNAMIC_SPACE_SIZE
/
(
1024
*
1024
));
exit
(
1
);
exit
(
1
);
}
}
...
@@ -509,7 +510,7 @@ main(int argc, char *argv[], char *envp[])
...
@@ -509,7 +510,7 @@ main(int argc, char *argv[], char *envp[])
default_core
=
"lisp.core"
;
default_core
=
"lisp.core"
;
os_init
();
os_init
();
#if
def
ined(__FreeBSD__) || defined(__linux__)
#ifdef
EXECUTABLE
if
(
builtin_image_flag
!=
0
)
if
(
builtin_image_flag
!=
0
)
map_core_sections
(
argv
[
0
]);
map_core_sections
(
argv
[
0
]);
#endif
#endif
...
@@ -585,7 +586,9 @@ main(int argc, char *argv[], char *envp[])
...
@@ -585,7 +586,9 @@ main(int argc, char *argv[], char *envp[])
/* Only look for a core file if we're not using a built-in image. */
/* Only look for a core file if we're not using a built-in image. */
#ifdef EXECUTABLE
if
(
builtin_image_flag
==
0
)
{
if
(
builtin_image_flag
==
0
)
{
#endif
/*
/*
* If no core file specified, search for it in CMUCLLIB
* If no core file specified, search for it in CMUCLLIB
*/
*/
...
@@ -612,19 +615,20 @@ main(int argc, char *argv[], char *envp[])
...
@@ -612,19 +615,20 @@ main(int argc, char *argv[], char *envp[])
exit
(
1
);
exit
(
1
);
}
}
}
}
#ifdef EXECUTABLE
}
else
{
}
else
{
/* The "core file" is the executable. We have to
do
th
is
/* The "core file" is the executable. We have to
save
th
e
*
because this file actually gets checked for
later.
"
*
executable path because we operate on the executable file
later.
*/
*/
core
=
argv
[
0
];
core
=
argv
[
0
];
}
}
#endif
globals_init
();
globals_init
();
#ifdef EXECUTABLE
if
(
builtin_image_flag
!=
0
)
{
if
(
builtin_image_flag
!=
0
)
{
extern
int
image_dynamic_space_size
;
extern
int
image_dynamic_space_size
;
long
allocation_pointer
=
long
allocation_pointer
=
(
long
)
dynamic_0_space
+
(
int
)
&
image_dynamic_space_size
;
(
long
)
dynamic_0_space
+
(
int
)
&
image_dynamic_space_size
;
#if defined(i386) || defined(__x86_64)
#if defined(i386) || defined(__x86_64)
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
allocation_pointer
);
SetSymbolValue
(
ALLOCATION_POINTER
,
(
lispobj
)
allocation_pointer
);
...
@@ -634,6 +638,9 @@ main(int argc, char *argv[], char *envp[])
...
@@ -634,6 +638,9 @@ main(int argc, char *argv[], char *envp[])
}
else
{
}
else
{
initial_function
=
load_core_file
(
core
);
initial_function
=
load_core_file
(
core
);
}
}
#else
initial_function
=
load_core_file
(
core
);
#endif
#if defined LINKAGE_TABLE
#if defined LINKAGE_TABLE
os_foreign_linkage_init
();
os_foreign_linkage_init
();
...
...
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