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
Container 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Jon Boone
cmucl
Commits
f68a9500
Commit
f68a9500
authored
14 years ago
by
agoncharov
Browse files
Options
Downloads
Patches
Plain Diff
EXECUTABLE seems to work on FreeBSD now. TODO: mv tools/linker-x86.sh tools/linker.sh
parent
069f884d
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
lisp/FreeBSD-os.c
+1
-2
1 addition, 2 deletions
lisp/FreeBSD-os.c
lisp/elf.c
+3
-4
3 additions, 4 deletions
lisp/elf.c
lisp/elf.h
+1
-5
1 addition, 5 deletions
lisp/elf.h
tools/linker-x86.sh
+13
-7
13 additions, 7 deletions
tools/linker-x86.sh
with
18 additions
and
18 deletions
lisp/FreeBSD-os.c
+
1
−
2
View file @
f68a9500
...
...
@@ -12,7 +12,7 @@
* Much hacked by Paul Werkowski
* GENCGC support by Douglas Crosher, 1996, 1997.
*
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/FreeBSD-os.c,v 1.3
5
2010/09/0
7
03:
56:3
8 agoncharov
Exp
$
* $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/FreeBSD-os.c,v 1.3
6
2010/09/0
8
03:
28:0
8 agoncharov
Rel
$
*
*/
...
...
@@ -308,7 +308,6 @@ void *
os_dlsym
(
const
char
*
sym_name
,
lispobj
lib_list
)
{
static
void
*
program_handle
;
void
*
sym_addr
=
0
;
if
(
!
program_handle
)
program_handle
=
dlopen
((
void
*
)
0
,
RTLD_LAZY
|
RTLD_GLOBAL
);
...
...
This diff is collapsed.
Click to expand it.
lisp/elf.c
+
3
−
4
View file @
f68a9500
...
...
@@ -8,7 +8,7 @@
Above changes put into main CVS branch. 05-Jul-2007.
$Id: elf.c,v 1.
29
2010/0
8
/0
2 21:59:43 rtoy Exp
$
$Id: elf.c,v 1.
30
2010/0
9
/0
8 03:28:08 agoncharov Rel
$
*/
#include
<stdio.h>
...
...
@@ -358,18 +358,17 @@ obj_run_linker(long init_func_address, char *file)
}
if
(
stat
(
command
,
&
st
)
==
0
)
{
extern
int
main
();
free
(
paths
);
printf
(
"
\t
[%s: linking %s...
\n
"
,
command
,
file
);
fflush
(
stdout
);
#if defined(__linux__) || defined(sparc)
#if defined(__linux__) ||
defined(__FreeBSD__) ||
defined(sparc)
sprintf
(
command_line
,
"%s %s 0x%lx '%s' 0x%lx 0x%lx 0x%lx"
,
command
,
C_COMPILER
,
init_func_address
,
file
,
(
unsigned
long
)
READ_ONLY_SPACE_START
,
(
unsigned
long
)
STATIC_SPACE_START
,
(
unsigned
long
)
DYNAMIC_0_SPACE_START
);
#else
extern
int
main
();
sprintf
(
command_line
,
"%s %s 0x%lx 0x%lx %s"
,
command
,
C_COMPILER
,
init_func_address
,
(
unsigned
long
)
&
main
,
file
);
#endif
...
...
This diff is collapsed.
Click to expand it.
lisp/elf.h
+
1
−
5
View file @
f68a9500
/* $Id: elf.h,v 1.1
3
2010/0
7/31 01:07:15 rtoy
Exp $ */
/* $Id: elf.h,v 1.1
4
2010/0
9/08 03:28:08 agoncharov
Exp $ */
/* This code was written by Fred Gilham and has been placed in the public domain. It is
provided "AS-IS" and without warranty of any kind.
...
...
@@ -13,16 +13,12 @@
#define _ELF_H_INCLUDED_
#if defined(__linux__) || defined(DARWIN) || defined(sparc)
/*
* Yes, it's named badly. But it works for sparc too, not just x86.
* If we ever get this fixed on FreeBSD, then we can move
* linker-x86.sh to linker.sh and be done with it.
*/
#define LINKER_SCRIPT "linker-x86.sh"
#else
#define LINKER_SCRIPT "linker.sh"
#endif
#if defined(SOLARIS)
#include
<sys/elf.h>
...
...
This diff is collapsed.
Click to expand it.
tools/linker-x86.sh
+
13
−
7
View file @
f68a9500
#!/bin/sh
# $Id: linker-x86.sh,v 1.
9
2010/0
8
/0
2 21:45:36 rtoy
Exp $
# $Id: linker-x86.sh,v 1.
10
2010/0
9
/0
8 03:28:08 agoncharov
Exp $
# This file written by Raymond Toy as part of CMU Common Lisp and is
# placed in the public domain.
...
...
@@ -44,11 +44,13 @@ CMUCLLIB=`dirname $0`
# Name of file where we write the actual initial function address.
OPT_IFADDR
=
"cmu-ifaddr-
$$
.c"
OPT_IFADDR
=
"cmu-ifaddr-alex.c"
# Names of the core sections from Lisp.
OPT_CORE
=
"CORRO.o CORSTA.o CORDYN.o"
case
`
uname
`
in
Linux
*
)
uname_s
=
`
uname
`
case
$uname_s
in
Linux|FreeBSD
)
# How to specify the starting address for each of the sections
# These aren't needed for Linux any more. map_core_sections
# takes care of getting the addresses.
...
...
@@ -57,7 +59,7 @@ case `uname` in
#STATIC_ADDR="-Wl,--section-start=CORSTA=$5"
#DYN_ADDR="-Wl,--section-start=CORDYN=$6"
#OPT_IFADDR="-Wl,--defsym -Wl,initial_function_addr=$IFADDR"
#OPT_IF
ADDR="-Wl,--defsym -Wl,initial_function_addr=$IFADDR"
# Specify how to link the entire lisp.a library
OPT_ARCHIVE
=
"-Wl,--whole-archive -Wl,
$CMUCLLIB
/lisp.a -Wl,--no-whole-archive"
...
...
@@ -65,8 +67,12 @@ case `uname` in
# Extra stuff.
OPT_EXTRA
=
"-rdynamic"
# See Config.x86_linux
OS_LIBS
=
-ldl
# See Config.x86_${uname_s}
case
$uname_s
in
Linux
)
OS_LIBS
=
-ldl
;;
FreeBSD
)
OS_LIBS
=
-lutil
;;
esac
;;
Darwin
*
)
# How to specify the starting address for each of the sections.
...
...
@@ -114,7 +120,7 @@ case `uname` in
esac
# Remove the C file when we're done.
trap
'rm -f $OUTDIR/$OPT_IFADDR $OUTDIR/CORRO.o $OUTDIR/CORSTA.o $OUTDIR/CORDYN.o'
0
#
trap 'rm -f $OUTDIR/$OPT_IFADDR $OUTDIR/CORRO.o $OUTDIR/CORSTA.o $OUTDIR/CORDYN.o' 0
(
cd
$OUTDIR
echo
"long initial_function_addr =
$IFADDR
;"
>
$OPT_IFADDR
...
...
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