elf.mes: drop .note section.
This commit is contained in:
parent
98d4772e3f
commit
403e487d16
47
elf.mes
47
elf.mes
|
@ -38,8 +38,8 @@
|
||||||
(define e-phentsize '(0 0))
|
(define e-phentsize '(0 0))
|
||||||
(define e-phnum '(#x01 #x00))
|
(define e-phnum '(#x01 #x00))
|
||||||
(define e-shentsize '(0 0))
|
(define e-shentsize '(0 0))
|
||||||
(define e-shnum '(#x05 #x00))
|
(define e-shnum '(#x04 #x00))
|
||||||
(define e-shstrndx '(#x04 #x00))
|
(define e-shstrndx '(#x03 #x00))
|
||||||
|
|
||||||
(define (elf-header)
|
(define (elf-header)
|
||||||
(append
|
(append
|
||||||
|
@ -140,19 +140,13 @@
|
||||||
(define data
|
(define data
|
||||||
(string->list "Hello, world!\n"))
|
(string->list "Hello, world!\n"))
|
||||||
|
|
||||||
(define note
|
;;;
|
||||||
'(
|
|
||||||
#x05 #x00 #x00 #x00 #x00 #x00 #x00 #x00 #x02 #x00 #x00 #x00
|
|
||||||
#\i #\3 #\8 #\6 #x00 #x00 #x00 #x00
|
|
||||||
))
|
|
||||||
|
|
||||||
;; 1098 sh str table
|
;; 1098 sh str table
|
||||||
(define tab
|
(define tab
|
||||||
`(
|
`(
|
||||||
#x00 ,@(string->list ".shstrtab")
|
#x00 ,@(string->list ".shstrtab")
|
||||||
#x00 ,@(string->list ".text")
|
#x00 ,@(string->list ".text")
|
||||||
#x00 ,@(string->list ".data")
|
#x00 ,@(string->list ".data")
|
||||||
#x00 ,@(string->list ".note")
|
|
||||||
#x00 #x00 #x00 #x00
|
#x00 #x00 #x00 #x00
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -244,38 +238,13 @@
|
||||||
sh-data-entsize
|
sh-data-entsize
|
||||||
))
|
))
|
||||||
|
|
||||||
;; 1130 sh3: .note
|
|
||||||
(define sh-note-name '(#x17 #x00 #x00 #x00))
|
|
||||||
(define sh-note-type '(#x07 #x00 #x00 #x00))
|
|
||||||
(define sh-note-flags '(#x00 #x00 #x00 #x00))
|
|
||||||
(define sh-note-addr '(#x00 #x00 #x00 #x00))
|
|
||||||
(define sh-note-offset '(#x84 #x10 #x00 #x00))
|
|
||||||
(define sh-note-size '(#x14 #x00 #x00 #x00))
|
|
||||||
(define sh-note-link '(#x00 #x00 #x00 #x00))
|
|
||||||
(define sh-note-info '(#x00 #x00 #x00 #x00))
|
|
||||||
(define sh-note-addralign '(#x01 #x00 #x00 #x00))
|
|
||||||
(define sh-note-entsize '(#x00 #x00 #x00 #x00))
|
|
||||||
|
|
||||||
(define sh-note
|
|
||||||
(append
|
|
||||||
sh-note-name
|
|
||||||
sh-note-type
|
|
||||||
sh-note-flags
|
|
||||||
sh-note-addr
|
|
||||||
sh-note-offset
|
|
||||||
sh-note-size
|
|
||||||
sh-note-link
|
|
||||||
sh-note-info
|
|
||||||
sh-note-addralign
|
|
||||||
sh-note-entsize
|
|
||||||
))
|
|
||||||
|
|
||||||
;; 1158 sh4: .shstrtab
|
;; 1158 sh4: .shstrtab
|
||||||
(define sh-tab-name '(#x01 #x00 #x00 #x00))
|
(define sh-tab-name '(#x01 #x00 #x00 #x00))
|
||||||
(define sh-tab-type '(#x03 #x00 #x00 #x00))
|
(define sh-tab-type '(#x03 #x00 #x00 #x00))
|
||||||
(define sh-tab-flags '(#x00 #x00 #x00 #x00))
|
(define sh-tab-flags '(#x00 #x00 #x00 #x00))
|
||||||
(define sh-tab-addr '(#x00 #x00 #x00 #x00))
|
(define sh-tab-addr '(#x00 #x00 #x00 #x00))
|
||||||
(define sh-tab-offset '(#x98 #x10 #x00 #x00))
|
;;(define sh-tab-offset '(#x98 #x10 #x00 #x00))
|
||||||
|
(define sh-tab-offset '(#x84 #x10 #x00 #x00))
|
||||||
(define sh-tab-size '(#x1d #x00 #x00 #x00))
|
(define sh-tab-size '(#x1d #x00 #x00 #x00))
|
||||||
(define sh-tab-link '(#x00 #x00 #x00 #x00))
|
(define sh-tab-link '(#x00 #x00 #x00 #x00))
|
||||||
(define sh-tab-info '(#x00 #x00 #x00 #x00))
|
(define sh-tab-info '(#x00 #x00 #x00 #x00))
|
||||||
|
@ -301,7 +270,6 @@
|
||||||
sh-0
|
sh-0
|
||||||
sh-text
|
sh-text
|
||||||
sh-data
|
sh-data
|
||||||
sh-note
|
|
||||||
sh-tab
|
sh-tab
|
||||||
))
|
))
|
||||||
|
|
||||||
|
@ -312,7 +280,6 @@
|
||||||
text
|
text
|
||||||
text-free
|
text-free
|
||||||
data
|
data
|
||||||
note
|
|
||||||
tab)))
|
tab)))
|
||||||
|
|
||||||
(set! e-shoff (int->bv32 (section-headers-offset)))
|
(set! e-shoff (int->bv32 (section-headers-offset)))
|
||||||
|
@ -324,11 +291,7 @@
|
||||||
text-free
|
text-free
|
||||||
;;1076 (+ 0804 8000): 0804 9076
|
;;1076 (+ 0804 8000): 0804 9076
|
||||||
data
|
data
|
||||||
;;1084
|
|
||||||
note
|
|
||||||
;;1098
|
|
||||||
tab
|
tab
|
||||||
;;10b8
|
|
||||||
section-headers
|
section-headers
|
||||||
))
|
))
|
||||||
(map write-char exe)
|
(map write-char exe)
|
||||||
|
|
Loading…
Reference in a new issue