anchor.diff:  ;
   ;
   ;
  +
  +
  +(defun read-null-terminated-ascii (in)
  +  (with-output-to-string (s)
  +    (loop for char = (code-char (read-byte in))
  +      until (char= char +null+) do (write-char char s))))
  +
  +;
  +;
  +; this code can be very simplified
   
   (defun read-header (stream)
     (let ((header (make-elf-header)))
  
positive.code:   	(setf (elf-section-addralign header) (read-word stream))
    	(setf (elf-section-entsize header) (read-word stream)) header))
  
  ;
  ;
  ;
  ;
  
  (defun read-elf-file ()
    (with-open-file (stream "c:/temp2/test.o" :element-type '(unsigned-byte 8))
    	(let ((header (read-header stream)))
    	  ; set offset to section start
    	  (file-position stream (elf-header-shoff header))
    	  (format t "elf header ~%")
    	  (print header)
    	  (format t "~%")
    	  (format t "~%")
    	  ; loop all sections
    	  (loop for i from 0 to (elf-header-shnum header) do
    	  	(print (read-section-header stream)))
    	  
  	  )))
  
  
negative.code: 	link
  	info
  	addralign
  	entsize
  	data)
  
  (defstruct symbol-table
    	name-string
  	name
  	value
  	size
  	info
  	other
  	shndx)
  
  
  (defstruct elf-file
    header
    sections
    symbol-table
    function-table
    text-offset
    data-offset
    rodata-offset
    bssdata-offset)
  
  ;
  ;
  