/[cmucl]/src/code/foreign.lisp
ViewVC logotype

Diff of /src/code/foreign.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35 by pmai, Thu Dec 6 19:15:41 2001 UTC revision 1.36 by pmai, Mon Jan 28 20:17:09 2002 UTC
# Line 89  Line 89 
89  ;;; The following definitions are taken from  ;;; The following definitions are taken from
90  ;;; /usr/include/sys/elf_common.h and /usr/include/sys/elf32.h.  ;;; /usr/include/sys/elf_common.h and /usr/include/sys/elf32.h.
91  ;;;  ;;;
92  #+(and FreeBSD elf)  #+(or NetBSD (and FreeBSD elf))
93  (progn  (progn
94  (alien:def-alien-type elf-address      (alien:unsigned 32))  (alien:def-alien-type elf-address      (alien:unsigned 32))
95  (alien:def-alien-type elf-half-word    (alien:unsigned 16))  (alien:def-alien-type elf-half-word    (alien:unsigned 16))
# Line 183  Line 183 
183            (unless (elf-p (alien:slot header 'elf-ident))            (unless (elf-p (alien:slot header 'elf-ident))
184                (error (format nil "~A is not an ELF file." name)))                (error (format nil "~A is not an ELF file." name)))
185    
186            (let ((brand (elf-brand (alien:slot header 'elf-ident))))            #-NetBSD
187              (unless (string= brand "FreeBSD" :end1 6 :end2 6)            (let ((brand (elf-brand (alien:slot header 'elf-ident)))
188                (error (format nil "~A is not a FreeBSD executable. Brand: ~A"                  (correct-brand #+NetBSD "NetBSD" #+FreeBSD "FreeBSD"))
189                               name brand))))              (unless (string= brand correct-brand :end1 (length correct-brand))
190                  (error (format nil "~A is not a ~A executable. Brand: ~A"
191                                 name correct-brand brand))))
192    
193            (unless (elf-executable-p (alien:slot header 'elf-type))            (unless (elf-executable-p (alien:slot header 'elf-type))
194              (error (format nil "~A is not executable." name)))              (error (format nil "~A is not executable." name)))
# Line 436  to skip undefined symbols which don't ha Line 438  to skip undefined symbols which don't ha
438              ))              ))
439        (unix:unix-close fd))))        (unix:unix-close fd))))
440    
441  #-(or linux solaris irix (and FreeBSD elf))  #-(or linux solaris irix NetBSD (and FreeBSD elf))
442  (defun parse-symbol-table (name)  (defun parse-symbol-table (name)
443    (format t ";;; Parsing symbol table...~%")    (format t ";;; Parsing symbol table...~%")
444    (let ((symbol-table (make-hash-table :test #'equal)))    (let ((symbol-table (make-hash-table :test #'equal)))

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.36

  ViewVC Help
Powered by ViewVC 1.1.5