[Openmcl-cvs-notifications] r13181 - /release/1.4/source/library/elf.lisp
gb at clozure.com
gb at clozure.com
Mon Nov 9 05:03:39 EST 2009
Author: gb
Date: Mon Nov 9 05:03:38 2009
New Revision: 13181
Log:
(in 1.4) In FIXUP-LISP-SECTION-HEADER-OFFSET, set the section header's
type to #$SHT_PROGBITS (fixes ticket:625).
While we're there, add an extra page to the calculated offset,
to account for the preceding image and section headers on 32-bit
platforms.
Modified:
release/1.4/source/library/elf.lisp
Modified: release/1.4/source/library/elf.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- release/1.4/source/library/elf.lisp (original)
+++ release/1.4/source/library/elf.lisp Mon Nov 9 05:03:38 2009
@@ -312,9 +312,17 @@
(fd-lseek fd pos #$SEEK_SET)
(fd-read fd shdr (record-length #+64-bit-target :<E>lf64_<S>hdr
#+32-bit-target :<E>lf32_<S>hdr))
+ ;; On 64-bit platforms, the section data precedes the image
+ ;; header; on 32-bit platforms, the image header and image
+ ;; section table precede the image data for the first (static)
+ ;; section. With alignment, the header/section headers are
+ ;; one 4K page, and the static section size is 8K ...
(setf (pref shdr #+64-bit-target :<E>lf64_<S>hdr.sh_offset
#+32-bit-target :<E>lf32_<S>hdr.sh_offset)
- (+ #x2000 (logandc2 (+ eof 4095) 4095))) ; #x2000 for nilreg-a=
rea
+ (+ #+32-bit-target #x1000 #+64-bit-target 0 #x2000 (logandc2 =
(+ eof 4095) 4095))) =
+ (setf (pref shdr #+64-bit-target :<E>lf64_<S>hdr.sh_type
+ #+32-bit-target :<E>lf32_<S>hdr.sh_type)
+ #$SHT_PROGBITS)
(fd-lseek fd pos #$SEEK_SET)
(fd-write fd shdr (record-length #+64-bit-target :<E>lf64_<S>hdr
#+32-bit-target :<E>lf32_<S>hdr))
More information about the Openmcl-cvs-notifications
mailing list