Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv1186
Modified Files:
pe.py
Log Message:
tranified some more of make_pe_aout_header via Interpreter.do
Index: pe.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pe.py 18 May 2003 18:00:09 -0000 1.15
+++ pe.py 18 May 2003 18:04:14 -0000 1.16
@@ -54,6 +54,14 @@
interp = Interpreter(h)
# #aout/image-base must be multiple of 64ki
# #aout/file-align must be a power of 2 in range of [512 ... 64Ki]
+ # &aout/image-end must be a multiple of #aout/memory-align
+ # !aout/header-end must be a multiple of #aout/file-align
+ # Known flags for #aout/dll-flags
+ # 0x0001 - per-process library initialization
+ # 0x0002 - per-process library termination
+ # 0x0004 - per-thread library initialization
+ # 0x0008 - per-thread library termination
+ # All others must be zero.
interp.do("""
4 align
' #aout/magic w, 0x10B =: #?aout/magic
@@ -76,23 +84,16 @@
' #aout/subsys-version-major w,
' #aout/subsys-version-minor w,
0 t,
+ ' &aout/image-end ' #rva + t,
+ ' !aout/header-end t,
+ ' #aout/checksum (opt) t,
+ ' #aout/subsys w,
+ ' #aout/dll-flags w,
+ ' #aout/stack-reserve-size t,
+ ' #aout/stack-commit-size t,
+ ' #aout/heap-reserve-size t,
+ ' #aout/heap-commit-size t,
""")
- # &aout/image-end must be a multiple of #aout/memory-align
- h.emit_tetra_sum(['&aout/image-end', '#rva'])
- # !aout/header-end must be a multiple of #aout/file-align
- h.emit_tetra_sum(['!aout/header-end'])
- h[::4] = 0 # checksum
- h[::2] = '#aout/subsys', '#aout/dll-flags'
- # Known flags for #aout/dll-flags
- # 0x0001 - per-process library initialization
- # 0x0002 - per-process library termination
- # 0x0004 - per-thread library initialization
- # 0x0008 - per-thread library termination
- # All others must be zero.
- h.emit_tetra_sum(['#aout/stack-reserve-size'])
- h.emit_tetra_sum(['#aout/stack-commit-size'])
- h.emit_tetra_sum(['#aout/heap-reserve-size'])
- h.emit_tetra_sum(['#aout/heap-commit-size'])
h.emit_tetra(0) # loader flags - obsolete
h.emit_tetra_sum(['#aout/dict-entry-count'])
h.emit_tetra_sum(['&export-table', '#rva'])
|