Permalink
Browse files

Added some more reading of data

  • Loading branch information...
1 parent dfcace8 commit fa6341df603b1003cb598d66c98254dc1059e171 @emoon committed Apr 14, 2011
Showing with 13 additions and 3 deletions.
  1. +13 −3 src/ELFParser.lisp
View
16 src/ELFParser.lisp
@@ -36,8 +36,18 @@
(with-open-file (stream "c:/temp2/test.o" :element-type '(unsigned-byte 8))
(let ((header make-elf-header))
(setf (elf-header-ident header) (read-string stream 16))
-
-
- )))
+ (setf (elf-header-type header) (read-half stream))
+ (setf (elf-header-machine header) (read-half stream))
+ (setf (elf-header-version header) (read-word stream))
+ (setf (elf-header-entry header) (read-addr stream))
+ (setf (elf-header-phoff header) (read-off stream))
+ (setf (elf-header-shoff header) (read-off stream))
+ (setf (elf-header-flags header) (read-word stream))
+ (setf (elf-header-ehsize header) (read-half stream))
+ (setf (elf-header-phentsize header) (read-half stream))
+ (setf (elf-header-phnum header) (read-half stream))
+ (setf (elf-header-shentsize header) (read-half stream))
+ (setf (elf-header-shnum header) (read-half stream))
+ (setf (elf-header-shstrndx header) (read-half stream)) header)))

0 comments on commit fa6341d

Please sign in to comment.