mescc/elf.mes: write minimal ELF header.
This commit is contained in:
parent
2097e9e4ef
commit
0829c5762c
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,6 +2,7 @@
|
|||
*.go
|
||||
*.o
|
||||
*~
|
||||
/a.out
|
||||
/mes
|
||||
/mes.h
|
||||
/environment.i
|
||||
|
|
|
@ -118,7 +118,7 @@ guile-paren: paren.test
|
|||
echo '___P((()))' | guile -s $^
|
||||
|
||||
mescc: all
|
||||
echo ' EOF ' | cat base0.mes base0-$(CONDIF).mes base.mes quasiquote.mes let.mes scm.mes syntax-cond.mes lib/srfi/srfi-0.scm lib/record.mes lib/record.scm lib/srfi/srfi-9.scm lib/lalr.mes lib/lalr.scm c-lexer.scm mescc.scm - main.c | ./mes
|
||||
echo ' EOF ' | cat base0.mes base0-$(CONDIF).mes base.mes quasiquote.mes let.mes scm.mes syntax-cond.mes lib/srfi/srfi-0.scm lib/record.mes lib/record.scm lib/srfi/srfi-9.scm lib/lalr.mes lib/lalr.scm c-lexer.scm mescc.scm - main.c | ./mes > a.out
|
||||
|
||||
mescc.test: lib/lalr.scm c-lexer.scm mescc.scm
|
||||
cat $^ > $@
|
||||
|
|
12
elf.mes
Normal file
12
elf.mes
Normal file
|
@ -0,0 +1,12 @@
|
|||
;;; -*-scheme-*-
|
||||
|
||||
(write-char #x7f)
|
||||
(write-char #x45)
|
||||
(write-char #x4c)
|
||||
(write-char #x46)
|
||||
(write-char #x08)
|
||||
(write-char #x48)
|
||||
(write-char #x65)
|
||||
(write-char #x6c)
|
||||
(write-char #x6c)
|
||||
(write-char #x6f)
|
10
mescc.scm
10
mescc.scm
|
@ -405,6 +405,12 @@
|
|||
(lambda ()
|
||||
(c-parser (c-lexer errorp) errorp))))
|
||||
|
||||
(display "program: ")
|
||||
(display (mescc))
|
||||
(display "program: " 2)
|
||||
(display (mescc) 2)
|
||||
(newline 2)
|
||||
|
||||
(define elf-header '(#x7f #E #L #F #x01))
|
||||
|
||||
(define elf-header '(#x7f #x45 #x4c #x46 #x01))
|
||||
(map write-char elf-header)
|
||||
(newline)
|
||||
|
|
Loading…
Reference in a new issue