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
79ecc481
Commit
79ecc481
authored
28 years ago
by
pw
Browse files
Options
Downloads
Patches
Plain Diff
This fixes the mess in load-foreign-symbol-table and removes
the OS specific conditionals. It ought to work for all cases.
parent
d1bb358f
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
compiler/generic/new-genesis.lisp
+22
-57
22 additions, 57 deletions
compiler/generic/new-genesis.lisp
with
22 additions
and
57 deletions
compiler/generic/new-genesis.lisp
+
22
−
57
View file @
79ecc481
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/new-genesis.lisp,v 1.2
1
1997/0
2/05 15:53:16
pw Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/generic/new-genesis.lisp,v 1.2
2
1997/0
3/15 17:24:53
pw Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -1606,62 +1606,27 @@
...
@@ -1606,62 +1606,27 @@
(
let
((
line
(
read-line
file
nil
nil
)))
(
let
((
line
(
read-line
file
nil
nil
)))
(
unless
line
(
unless
line
(
return
))
(
return
))
(
multiple-value-bind
(
when
(
or
(
whitespacep
(
aref
line
0
))
(
value
name
)
(
whitespacep
(
aref
line
(
1-
(
length
line
)))))
(
if
(
string=
"0x"
line
:end2
2
)
(
setq
line
(
string-trim
'
(
#\Space
#\Tab
)
line
)))
;;; (values (parse-integer line :start 2
(
let
((
p1
(
position-if
#'
whitespacep
line
:from-end
nil
))
;;; :end #-alpha 10 #+alpha 18 :radix 16)
(
p2
(
position-if
#'
whitespacep
line
:from-end
t
)))
;;; (subseq line #-alpha 13 #+alpha 19))
(
if
(
not
(
and
p1
p2
))
;;; (values (parse-integer line :end #-alpha 8 #+alpha 16
(
warn
"Ignoring malformed line ~s in ~a"
line
filename
)
;;; :radix 16)
(
multiple-value-bind
;;; (subseq line #-alpha 11 #+alpha 19)))
(
value
name
)
;;; If your nm produces 64-bit addresses, there's 3 ways to get
(
if
(
string=
"0x"
line
:end2
2
)
;;; new-genesis to work: Yet another is to use 'sed' in your Config file.
(
values
(
parse-integer
line
:start
2
:end
p1
:radix
16
)
;; OPTION 1 --- hard-wire 16 bit values into line
(
subseq
line
(
1+
p2
)))
;; i.e. replace above six lines with these
(
values
(
parse-integer
line
:end
p1
:radix
16
)
; (values (parse-integer line :start 2 :end 18 :radix 16)
(
subseq
line
(
1+
p2
))))
; (subseq line #-alpha 21 #+alpha 19))
(
multiple-value-bind
; (values (parse-integer line :end 16 :radix 16)
(
old-value
found
)
; (subseq line #-alpha 19 #+alpha 19)))
(
gethash
name
*cold-foreign-symbol-table*
)
;; OPTION 2 --- scan line, read junk, and do subseq until non-int char found
(
when
found
; (values (parse-integer line :start 2 :end 16 :radix 16
(
warn
"Redefining ~S from #x~X to #x~X"
; :junk-allowed t)
name
old-value
value
)))
; (let ((pos 2))
(
setf
(
gethash
name
*cold-foreign-symbol-table*
)
value
))))))
; (loop
; (setq pos (+ pos 8))
; (if (not (digit-char-p (char line pos) 16))
; (return)))
; (subseq line (+ pos 3))))
; (values (parse-integer line :end 16 :radix 16
; :junk-allowed t)
; (let ((pos 0))
; (loop
; (setq pos (+ pos 8))
; (if (not (digit-char-p (char line pos) 16))
; (return)))
; (subseq line (+ pos 3)))))
;;; OPTION 3 --- use environment variable for 64 bit linux
;; i.e. in setenv.lsp add (pushnew :linux64 *features*)
;; (using the alpha flag also works, but I don't know if it has
;; side-effects)
(
values
(
parse-integer
line
:start
2
:radix
16
:end
#-
(
or
alpha
linux64
)
10
#+
(
or
alpha
linux64
)
18
)
(
subseq
line
#-
(
or
alpha
linux64
)
13
#+
(
or
alpha
linux64
)
19
))
(
values
(
parse-integer
line
:radix
16
:end
#-
(
or
alpha
linux64
)
8
#+
(
or
alpha
linux64
)
16
)
(
subseq
line
#-
(
or
alpha
linux64
)
11
#+
(
or
alpha
linux64
)
19
)))
;; END OPTIONS
(
multiple-value-bind
(
old-value
found
)
(
gethash
name
*cold-foreign-symbol-table*
)
(
when
found
(
warn
"Redefining ~S from #x~X to #x~X"
name
old-value
value
)))
(
setf
(
gethash
name
*cold-foreign-symbol-table*
)
value
))))
version
)))
version
)))
(
defun
lookup-foreign-symbol
(
name
)
(
defun
lookup-foreign-symbol
(
name
)
...
...
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