anchor.diff:  
   (defconstant +null+ (code-char 0))
   
  -(defstruct elf-header
  -    ident
  -	type
  -	machine
  -	version
  -	entry
  -	phoff
  -	shoff
  -	flags
  -	ehsize
  -	phentsize
  -	phnum
  -	shentsize
  -	shnum
  -	shstrndx)
  -
  -(defstruct elf-section 
  -  	name-string
  -  	name
  -	type
  -	flags
  -	addr
  -	offset
  -	size
  -	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)
  -
  -;
  -;
  -;
  -;
  +(defstruct elf-header ident type machine version entry phoff shoff flags ehsize phentsize phnum shentsize shnum shstrndx)
  +(defstruct elf-section name-string name type flags addr offset size link info addralign entsize data)
  +(defstruct elf-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)
  +
  +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  +;;; Helpers
   
   
   (defun read-string (stream length)
  
positive.code:   (declare (optimize (speed 0) (safety 3) (debug 3)))
    (with-open-file (stream "c:/temp2/Libc.a" :element-type '(unsigned-byte 8))
  
  	; Make sure we have the correct header
  
  	(let ((header-string (read-string stream 8)))
  	  (unless (search "!<arch>" header-string)
  	  	(return-from archive-read-file nil))
  
  	; scan for files 
  
  	(loop for i from 0 to 1000000 do
  	  (let ((temp (archive-header-read stream)))
  	    (unless (search "`" (archive-header-fmag temp))
  	   	  (return-from archive-read-file))
  
  		(pprint temp)
  
  	   	; parse elf file 
  
  		(let ((current-pos (file-position stream)))
  		  (unless (eq (search "/ " (archive-header-name temp)) 0)
  		  	(elf-read-stream current-pos stream))
  
  	   	  ; search to next entry
  	   	 
  		  (file-position stream (+ current-pos (archive-header-size temp)))))))))
  
  
  
negative.code:   (declare (optimize (speed 0) (safety 3) (debug 3)))
  
    (let ((elf-file (make-elf-file))
          (header (read-header stream)))
  
      (setf (elf-file-header elf-file) header)
      (file-pos-rel stream file-offset (elf-header-shoff header))
  
      ; read all sections
    
      (let ((sections (make-array (elf-header-shnum header) :element-type 'elf-section)))
        (loop for i from 0 below (elf-header-shnum header) do
          (setf (aref sections i) (read-section-header stream)))
  
        (setf (elf-file-sections elf-file) sections)
  
        ; resolve the names for the sections
    
        (let ((symtab-section-offset (elf-section-offset (aref sections (elf-header-shstrndx header)))))
          (loop for i from 0 below (elf-header-shnum header) do
            ; set file-position to where the string is
            (file-pos-rel stream file-offset (+ symtab-section-offset (elf-section-name (aref sections i))))
            (setf (elf-section-name-string (aref sections i)) (read-null-terminated-ascii stream))))
  
        ; Setup the symbols table
  
        (let ((symtab-section (find-section sections ".symtab")))
  
        (when symtab-section
          (setf (elf-file-symbol-table elf-file) (read-symtable stream file-offset
                                                 (elf-section-offset symtab-section) 
                                                 (elf-section-size symtab-section)  
                                                 (elf-section-entsize symtab-section)))
        ; resolve the names
    
          (let ((symtab-section-offset (elf-section-offset (aref sections (elf-section-link symtab-section))))
                (symbol-table (elf-file-symbol-table elf-file))
                (symbol-hash (make-hash-table)))
            (loop for i from 0 below (length symbol-table) do
              (file-pos-rel stream file-offset (+ symtab-section-offset (elf-symbol-table-name (aref symbol-table i))))
              (setf (elf-symbol-table-name-string (aref symbol-table i)) (read-null-terminated-ascii stream)))
  
            ; create a hash-table with function mappings
      
            (loop for i from 0 below (length symbol-table) do
              (when (eq (logand (symbol-table-info (aref symbol-table i)) #xf) 2)
              (setf (gethash (elf-symbol-table-name-string (aref symbol-table i)) symbol-hash) 
                             (elf-symbol-table-value (aref symbol-table i)))))
  
            (setf (elf-file-function-table elf-file) symbol-hash))
    
          ; read the data's to the sections that needs it
  
          (read-section-data stream file-offset sections ".text")
          (read-section-data stream file-offset sections ".data")
          (read-section-data stream file-offset sections ".rodata")))) elf-file)) 
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  (defun elf-file-read (filename)
    (with-open-file (stream filename :element-type '(unsigned-byte 8))
      (elf-read-stream 0 stream)))
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  ;;; Archiver Reader
  
  (defstruct archive-header name date uid gid mode size fmag)
  
  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  
  