[Wisp-cvs] wisp/users/dig make-pe-exe.py,1.61,1.62 pe.py,1.2,1.3
Status: Alpha
Brought to you by:
digg
|
From: <di...@us...> - 2003-05-16 14:21:44
|
Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv13357
Modified Files:
make-pe-exe.py pe.py
Log Message:
added constants for #aout/subsys to pe.py
Index: make-pe-exe.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- make-pe-exe.py 16 May 2003 14:13:04 -0000 1.61
+++ make-pe-exe.py 16 May 2003 14:21:40 -0000 1.62
@@ -237,8 +237,7 @@
# 4.0 = MSW95
e.place_symbol('#aout/subsys-version-major', 4)
e.place_symbol('#aout/subsys-version-minor', 0)
-# 3 = Windows character
-e.place_symbol('#aout/subsys', 3)
+e.place_symbol('#aout/subsys', PE_SUBSYS.WINDOWS_CHAR)
e.place_symbol('#aout/dll-flags', 0)
e.place_symbol('#aout/stack-reserve-size', 1024 * 1024) # one megabyte
e.place_symbol('#aout/stack-commit-size', 0x1000) # one page
Index: pe.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/pe.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pe.py 16 May 2003 14:13:04 -0000 1.2
+++ pe.py 16 May 2003 14:21:40 -0000 1.3
@@ -8,6 +8,16 @@
from mz import *
+class PE_SUBSYS:
+ UNKNOWN = 0
+ NATIVE = 1
+ WINDOWS_GUI = 2
+ WINDOWS_CHAR = 3
+ OS2_CHAR = 5
+ POSIX_CHAR = 7
+ NATIVE_WINDOWS = 8
+ WINDOWS_CE_GUI = 9
+
def make_pe_mz_stub (message = 'OS too broken'):
# The result's assumed origin address is 0x100.
if message.find('$') != -1:
@@ -77,14 +87,6 @@
h.emit_tetra_sum(['!aout/header-end'])
h.emit_tetra(0) # checksum
h.emit_wyde_sum(['#aout/subsys'])
- # Known values for #aout/subsys
- # 0x0000 - unknown
- # 0x0001 - native
- # 0x0002 - Windows GUI
- # 0x0003 - Windows character
- # 0x0005 - OS/2 character
- # 0x0007 - POSIX character
- # 0x0009 - Windows CE GUI
h.emit_wyde_sum(['#aout/dll-flags'])
# Known flags for #aout/dll-flags
# 0x0001 - per-process library initialization
@@ -130,4 +132,3 @@
h.emit_tetra_sum(['#COM+-runtime-header/size'])
h.emit_tetra(0); h.emit_tetra(0) # reserved
return h
-
|