wisp-cvs Mailing List for Wisp interpreter (Page 11)
Status: Alpha
Brought to you by:
digg
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(30) |
Sep
(312) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(5) |
Feb
(131) |
Mar
(17) |
Apr
(184) |
May
(252) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
From: <di...@us...> - 2003-05-01 20:51:26
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv13662 Modified Files: tran-builtins Log Message: use clearer syntax Index: tran-builtins =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/tran-builtins,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tran-builtins 22 Apr 2003 17:34:09 -0000 1.2 +++ tran-builtins 1 May 2003 20:51:23 -0000 1.3 @@ -83,10 +83,10 @@ cursect.align(long(Regstack.pop())) b, int - cursect.emit_byte(long(Regstack.pop()) % 0x100) + cursect[::1] = long(Regstack.pop()) b, sym - cursect.emit_byte_sum([str(Regstack.pop())]) + cursect[::1] = str(Regstack.pop()) commit Regstack.reverse() |
From: <di...@us...> - 2003-05-01 20:50:02
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv12991 Modified Files: make-pe-exe.py Log Message: explicitly zero %global-pointer in the corresponding directory Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- make-pe-exe.py 1 May 2003 20:45:54 -0000 1.14 +++ make-pe-exe.py 1 May 2003 20:49:57 -0000 1.15 @@ -389,6 +389,7 @@ e.place_symbol('#debug-data/size', 0) e.place_symbol('%architecture-specific', 0) e.place_symbol('#architecture-specific/size', 0) +e.place_symbol('%global-pointer', 0) e.place_symbol('%thread-local-storage', 0) e.place_symbol('#thread-local-storage/size', 0) e.place_symbol('%load-config-table', 0) |
From: <di...@us...> - 2003-05-01 20:45:59
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv11052 Modified Files: make-pe-exe.py Log Message: fill in base-relocation-table directory entries with zeroes Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- make-pe-exe.py 1 May 2003 20:41:43 -0000 1.13 +++ make-pe-exe.py 1 May 2003 20:45:54 -0000 1.14 @@ -383,6 +383,8 @@ e.place_symbol('#exception-table/size', 0) e.place_symbol('!certificate-table', 0) e.place_symbol('#certificate-table/size', 0) +e.place_symbol('%base-relocation-table', 0) +e.place_symbol('#base-relocation-table/size', 0) e.place_symbol('%debug-data', 0) e.place_symbol('#debug-data/size', 0) e.place_symbol('%architecture-specific', 0) |
From: <di...@us...> - 2003-05-01 20:41:47
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv9220 Modified Files: make-pe-exe.py Log Message: let #coff/flags be 0x0207 instead of 0x0002 Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- make-pe-exe.py 29 Apr 2003 01:55:37 -0000 1.12 +++ make-pe-exe.py 1 May 2003 20:41:43 -0000 1.13 @@ -347,7 +347,7 @@ e.place_symbol('!coff/symptr', 0) e.place_symbol('#coff/nsyms', 0) e.place_symbol('#coff/opthdr', 0x00E0) -e.place_symbol('#coff/flags', 0x0002) +e.place_symbol('#coff/flags', 0x0207) e.place_symbol('#aout/magic', 0x010B) # PE32 e.place_symbol('#aout/linker-version-major', 0) e.place_symbol('#aout/linker-version-minor', 1) |
From: <di...@us...> - 2003-04-29 01:55:43
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv517 Modified Files: make-pe-exe.py Log Message: dump .text before further processing Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- make-pe-exe.py 29 Apr 2003 01:47:04 -0000 1.11 +++ make-pe-exe.py 29 Apr 2003 01:55:37 -0000 1.12 @@ -227,6 +227,8 @@ text.emit_byte(0x68); text.emit_tetra(0) # push 0 text.emit_byte(0xe8); text.emit_tetra_sum(['&ExitProcess@kernel32'], delta = -4, relative = 1) # call ExitProcess +print 'TEXT'; text.dump() + istubs = Linkie('<') data = Linkie('<') |
From: <di...@us...> - 2003-04-29 01:47:07
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv30475 Modified Files: make-pe-exe.py Log Message: fill in the bound import table and import address table directories Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- make-pe-exe.py 29 Apr 2003 01:38:51 -0000 1.10 +++ make-pe-exe.py 29 Apr 2003 01:47:04 -0000 1.11 @@ -389,6 +389,10 @@ e.place_symbol('#thread-local-storage/size', 0) e.place_symbol('%load-config-table', 0) e.place_symbol('#load-config-table/size', 0) +e.place_symbol('%bound-import-table', 0) +e.place_symbol('#bound-import-table/size', 0) +e.place_symbol('%import-address-table', 0) +e.place_symbol('#import-address-table/size', 0) e.place_symbol('%delay-import-descriptor', 0) e.place_symbol('#delay-import-descriptor/size', 0) e.place_symbol('%COM+-runtime-header', 0) |
From: <di...@us...> - 2003-04-29 01:38:55
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv27771 Modified Files: make-pe-exe.py Log Message: no hint-name array Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- make-pe-exe.py 29 Apr 2003 01:30:35 -0000 1.9 +++ make-pe-exe.py 29 Apr 2003 01:38:51 -0000 1.10 @@ -280,15 +280,11 @@ imports.align(4) import_table_start = imports.memsz() for dll in imports_by_dlls.keys(): - imports.emit_tetra_sum(['%.imports/' + dll + '/hint-name']) - imports.emit_tetra(0) # timestamp - imports.emit_tetra_sum(['#.imports/' + dll + '/forwarder-chain']) - imports.emit_tetra_sum(['%.imports/' + dll + '/dll-name']) - imports.emit_tetra_sum(['%.imports/' + dll + '/first-thunk']) + imports[::4] = 0, 0 # hint-name pointer, timestamp + imports[::4] = '#.imports/' + dll + '/forwarder-chain' + imports[::4] = '%.imports/' + dll + '/dll-name' + imports[::4] = '%.imports/' + dll + '/first-thunk' imports.place_symbol('#.imports/' + dll + '/forwarder-chain', 0) - # Apparently, hint-name array may not exist. - # It is rumoured that Symantec's linkers don't emit it. - imports.place_symbol('%.imports/' + dll + '/hint-name', 0) imports.emit_string('\0' * 20) # emit thunk lists for dll in imports_by_dlls.keys(): |
From: <di...@us...> - 2003-04-29 01:30:39
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv24729 Modified Files: make-pe-exe.py Log Message: place symbols for section flags Index: make-pe-exe.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/make-pe-exe.py,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- make-pe-exe.py 27 Apr 2003 11:44:28 -0000 1.8 +++ make-pe-exe.py 29 Apr 2003 01:30:35 -0000 1.9 @@ -256,6 +256,11 @@ e.place_symbol('!' + s + '/lineno', 0) e.place_symbol('#' + s + '/reloc', 0) e.place_symbol('#' + s + '/lineno', 0) +e.place_symbol('#.text/flags', 0x60000020) +e.place_symbol('#.istubs/flags', 0x60000020) +e.place_symbol('#.data/flags', 0xc0000040) +e.place_symbol('#.bss/flags', 0xc0000080) +e.place_symbol('#.imports/flags', 0xc0000040) e.align(512) e.place_symbol('!aout/header-end') ## generate import structures |
From: <di...@us...> - 2003-04-27 20:42:15
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv27281 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- elf.py 27 Apr 2003 20:11:00 -0000 1.51 +++ elf.py 27 Apr 2003 20:18:06 -0000 1.52 @@ -374,12 +374,12 @@ t[::4] = '#' + name + '/sh_flags' if zero_addresses: t[::4] = 0 else: t[::4] = '&' + name - t.emit_tetra_sum(['!' + name]) - t.emit_tetra_sum(['#' + name + '/sh_size']) - t.emit_tetra_sum(['#' + name + '/sh_link']) - t.emit_tetra_sum(['#' + name + '/sh_info']) - t.emit_tetra_sum(['#' + name + '/sh_align']) - t.emit_tetra_sum(['#' + name + '/sh_entsize']) + t[::4] = '!' + name + t[::4] = '#' + name + '/sh_size' + t[::4] = '#' + name + '/sh_link' + t[::4] = '#' + name + '/sh_info' + t[::4] = '#' + name + '/sh_align' + t[::4] = '#' + name + '/sh_entsize' t.place_symbol('#elf/shnum', len(names) + 1) return t |
From: <di...@us...> - 2003-04-27 20:11:04
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv25022 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- elf.py 27 Apr 2003 18:00:08 -0000 1.50 +++ elf.py 27 Apr 2003 20:11:00 -0000 1.51 @@ -335,7 +335,7 @@ else: raise 'Invalid byte order', byte_order h[::1] = EV.CURRENT - h.emit_string('\0' * 9) + h[::1] = (0,) * 9 h[::2] = '#elf/type', '#elf/machine' h[::4] = EV.CURRENT if not reloc: h[::4] = '&_start', '!elf/proghdr' |
From: <di...@us...> - 2003-04-27 18:00:22
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv6122 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- elf.py 27 Apr 2003 17:55:54 -0000 1.49 +++ elf.py 27 Apr 2003 18:00:08 -0000 1.50 @@ -336,8 +336,7 @@ raise 'Invalid byte order', byte_order h[::1] = EV.CURRENT h.emit_string('\0' * 9) - h.emit_wyde_sum(['#elf/type']) - h.emit_wyde_sum(['#elf/machine']) + h[::2] = '#elf/type', '#elf/machine' h[::4] = EV.CURRENT if not reloc: h[::4] = '&_start', '!elf/proghdr' else: h[::4] = 0, 0 |
From: <di...@us...> - 2003-04-27 17:59:48
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv5901 Modified Files: linkie.py Log Message: fixed size handling in Linkie.emit_single_item Index: linkie.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- linkie.py 27 Apr 2003 15:18:19 -0000 1.48 +++ linkie.py 27 Apr 2003 17:59:45 -0000 1.49 @@ -57,8 +57,10 @@ this.emit_tetra(this._emit_sum(4, addends, delta, relative)) def emit_single_item (this, step, value): if isinstance(value, str): - this.emit_tetra(this._emit_sum(step, [value], - delta = 0, relative = 0)) + # emit addend + this._emit_sum(step, [value], delta = 0, relative = 0) + # emit zeroes for length + this[::step] = 0 else: Bits.emit_single_item(this, step, value) def skip (this, amount): |
From: <di...@us...> - 2003-04-27 17:55:57
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv4543 Modified Files: elf.py Log Message: rolled back bad patch Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- elf.py 27 Apr 2003 15:24:01 -0000 1.48 +++ elf.py 27 Apr 2003 17:55:54 -0000 1.49 @@ -336,7 +336,8 @@ raise 'Invalid byte order', byte_order h[::1] = EV.CURRENT h.emit_string('\0' * 9) - h[::2] = '#elf/type', '#elf/machine' + h.emit_wyde_sum(['#elf/type']) + h.emit_wyde_sum(['#elf/machine']) h[::4] = EV.CURRENT if not reloc: h[::4] = '&_start', '!elf/proghdr' else: h[::4] = 0, 0 |
From: <di...@us...> - 2003-04-27 15:24:05
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv24533 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- elf.py 27 Apr 2003 15:22:51 -0000 1.47 +++ elf.py 27 Apr 2003 15:24:01 -0000 1.48 @@ -336,8 +336,7 @@ raise 'Invalid byte order', byte_order h[::1] = EV.CURRENT h.emit_string('\0' * 9) - h.emit_wyde_sum(['#elf/type']) - h.emit_wyde_sum(['#elf/machine']) + h[::2] = '#elf/type', '#elf/machine' h[::4] = EV.CURRENT if not reloc: h[::4] = '&_start', '!elf/proghdr' else: h[::4] = 0, 0 |
From: <di...@us...> - 2003-04-27 15:22:54
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv23581 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- elf.py 27 Apr 2003 13:19:38 -0000 1.46 +++ elf.py 27 Apr 2003 15:22:51 -0000 1.47 @@ -351,7 +351,7 @@ def make_ELF32_phtable (byte_order, names): t = Linkie(byte_order) t.align(4) - t.place_symbol('!elf/proghdr') + t |= '!elf/proghdr' for name in names: t[::4] = '#' + name + '/p_type' t[::4] = '!' + name # offset @@ -367,14 +367,14 @@ def make_ELF32_shtable (byte_order, names, zero_addresses = 0): t = Linkie(byte_order) t.align(4) - t.place_symbol('!elf/secthdr') + t |= '!elf/secthdr' t.emit_string('\0' * 40) # the null entry for name in names: - t.emit_tetra_sum(['#.shstrtab/strings/' + name]) - t.emit_tetra_sum(['#' + name + '/sh_type']) - t.emit_tetra_sum(['#' + name + '/sh_flags']) + t[::4] = '#.shstrtab/strings/' + name + t[::4] = '#' + name + '/sh_type' + t[::4] = '#' + name + '/sh_flags' if zero_addresses: t[::4] = 0 - else: t.emit_tetra_sum(['&' + name]) + else: t[::4] = '&' + name t.emit_tetra_sum(['!' + name]) t.emit_tetra_sum(['#' + name + '/sh_size']) t.emit_tetra_sum(['#' + name + '/sh_link']) |
From: <di...@us...> - 2003-04-27 15:18:52
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv20403 Modified Files: makehello.py Log Message: use cleaner syntax in makehello.py Index: makehello.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/makehello.py,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- makehello.py 27 Apr 2003 12:50:20 -0000 1.26 +++ makehello.py 27 Apr 2003 15:18:48 -0000 1.27 @@ -10,7 +10,7 @@ from elf import * code = Linkie('<') # ia32 -code.place_symbol('&_start') +code |= '&_start' code[::1] = 0xBA; code[::4] = 14 # mov edx, 14 code[::1] = 0xB9; code[::4] = '&message' # mov ecx, message code[::1] = 0xBB; code[::4] = 1 # mov ebx, 1 @@ -21,7 +21,7 @@ code[::1] = 0xCD, 0x80 # int 0x80 data = Linkie('<') # ia32 -data.place_symbol('&message') +data |= '&message' data[::1] = map(ord, 'Hello, world!\n') print 'With symbols' |
From: <di...@us...> - 2003-04-27 15:18:22
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv19983 Modified Files: linkie.py Log Message: return this from Linkie.__ior__ Index: linkie.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- linkie.py 27 Apr 2003 15:14:31 -0000 1.47 +++ linkie.py 27 Apr 2003 15:18:19 -0000 1.48 @@ -119,6 +119,7 @@ return value def __ior__ (this, symbol): this.place_symbol(symbol) + return this def align (this, boundary): """align(boundary) Ensures that the following byte's memory address is divisible by |
From: <di...@us...> - 2003-04-27 15:14:35
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv17340 Modified Files: linkie.py Log Message: replaced Linkie.__iadd__ by Linkie.__ior__ Index: linkie.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- linkie.py 27 Apr 2003 13:32:45 -0000 1.46 +++ linkie.py 27 Apr 2003 15:14:31 -0000 1.47 @@ -117,7 +117,7 @@ if symbol[0] in '&%': value += this._origin this._symbols.append((symbol, value)) return value - def __iadd__ (this, symbol): + def __ior__ (this, symbol): this.place_symbol(symbol) def align (this, boundary): """align(boundary) |
From: <di...@us...> - 2003-04-27 13:32:49
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv4886 Modified Files: linkie.py Log Message: introduced Linkie.__iadd__ Index: linkie.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- linkie.py 27 Apr 2003 12:48:30 -0000 1.45 +++ linkie.py 27 Apr 2003 13:32:45 -0000 1.46 @@ -117,6 +117,8 @@ if symbol[0] in '&%': value += this._origin this._symbols.append((symbol, value)) return value + def __iadd__ (this, symbol): + this.place_symbol(symbol) def align (this, boundary): """align(boundary) Ensures that the following byte's memory address is divisible by |
From: <di...@us...> - 2003-04-27 13:19:41
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv29904 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- elf.py 27 Apr 2003 13:09:02 -0000 1.45 +++ elf.py 27 Apr 2003 13:19:38 -0000 1.46 @@ -353,14 +353,14 @@ t.align(4) t.place_symbol('!elf/proghdr') for name in names: - t.emit_tetra_sum(['#' + name + '/p_type']) - t.emit_tetra_sum(['!' + name]) # offset - t.emit_tetra_sum(['&' + name]) # p_vaddr - t.emit_tetra_sum(['&' + name]) # p_paddr - t.emit_tetra_sum(['#' + name + '/filesz']) - t.emit_tetra_sum(['#' + name + '/memsz']) - t.emit_tetra_sum(['#' + name + '/p_flags']) - t.emit_tetra_sum(['#' + name + '/p_align']) + t[::4] = '#' + name + '/p_type' + t[::4] = '!' + name # offset + t[::4] = '&' + name # p_vaddr + t[::4] = '&' + name # p_paddr + t[::4] = '#' + name + '/filesz' + t[::4] = '#' + name + '/memsz' + t[::4] = '#' + name + '/p_flags' + t[::4] = '#' + name + '/p_align' t.place_symbol('#elf/phnum', len(names)) return t |
From: <di...@us...> - 2003-04-27 13:09:05
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv23925 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- elf.py 27 Apr 2003 13:07:50 -0000 1.44 +++ elf.py 27 Apr 2003 13:09:02 -0000 1.45 @@ -342,12 +342,10 @@ if not reloc: h[::4] = '&_start', '!elf/proghdr' else: h[::4] = 0, 0 h[::4] = '!elf/secthdr', '#elf/flags' - h[::2] = 0x34 # e_ehsize - h[::2] = 32 # e_phentsize - h.emit_wyde_sum(['#elf/phnum']) + h[::2] = 0x34, 32 # e_ehsize, e_phentsize + h[::2] = '#elf/phnum' h[::2] = 40 # e_shentsize - h.emit_wyde_sum(['#elf/shnum']) - h.emit_wyde_sum(['#elf/shstrndx']) + h[::2] = '#elf/shnum', '#elf/shstrndx' return h def make_ELF32_phtable (byte_order, names): |
From: <di...@us...> - 2003-04-27 13:08:09
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv22954 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- elf.py 27 Apr 2003 13:00:45 -0000 1.42 +++ elf.py 27 Apr 2003 13:07:00 -0000 1.43 @@ -339,12 +339,8 @@ h.emit_wyde_sum(['#elf/type']) h.emit_wyde_sum(['#elf/machine']) h[::4] = EV.CURRENT - if reloc: - h[::4] = 0 # no &_start - h[::4] = 0 # no !elf/proghdr - else: - h.emit_tetra_sum(['&_start']) - h.emit_tetra_sum(['!elf/proghdr']) + if not reloc: h[::4] = '&_start', '!elf/proghdr' + else: h[::4] = 0, 0 h.emit_tetra_sum(['!elf/secthdr']) h.emit_tetra_sum(['#elf/flags']) h[::2] = 0x34 # e_ehsize |
From: <di...@us...> - 2003-04-27 13:07:53
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv23306 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- elf.py 27 Apr 2003 13:07:00 -0000 1.43 +++ elf.py 27 Apr 2003 13:07:50 -0000 1.44 @@ -341,8 +341,7 @@ h[::4] = EV.CURRENT if not reloc: h[::4] = '&_start', '!elf/proghdr' else: h[::4] = 0, 0 - h.emit_tetra_sum(['!elf/secthdr']) - h.emit_tetra_sum(['#elf/flags']) + h[::4] = '!elf/secthdr', '#elf/flags' h[::2] = 0x34 # e_ehsize h[::2] = 32 # e_phentsize h.emit_wyde_sum(['#elf/phnum']) |
From: <di...@us...> - 2003-04-27 13:00:50
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv19876 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- elf.py 27 Apr 2003 12:58:08 -0000 1.41 +++ elf.py 27 Apr 2003 13:00:45 -0000 1.42 @@ -326,7 +326,7 @@ def make_ELF32_header (byte_order, reloc = 0): h = Linkie(byte_order) h.align(4) - h.emit_string('\x7F' + 'ELF') # magic + h[::1] = 0x7F, 0x45, 0x4C, 0x46 # magic h[::1] = ELFCLASS.TETRA if byte_order == '<': h[::1] = ELFDATA.TWOLSB |
From: <di...@us...> - 2003-04-27 12:58:11
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv18259 Modified Files: elf.py Log Message: use cleaner syntax in elf.py Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- elf.py 27 Apr 2003 12:56:17 -0000 1.40 +++ elf.py 27 Apr 2003 12:58:08 -0000 1.41 @@ -338,10 +338,10 @@ h.emit_string('\0' * 9) h.emit_wyde_sum(['#elf/type']) h.emit_wyde_sum(['#elf/machine']) - h.emit_tetra(EV.CURRENT) + h[::4] = EV.CURRENT if reloc: - h.emit_tetra(0) # no &_start - h.emit_tetra(0) # no !elf/proghdr + h[::4] = 0 # no &_start + h[::4] = 0 # no !elf/proghdr else: h.emit_tetra_sum(['&_start']) h.emit_tetra_sum(['!elf/proghdr']) @@ -380,7 +380,7 @@ t.emit_tetra_sum(['#.shstrtab/strings/' + name]) t.emit_tetra_sum(['#' + name + '/sh_type']) t.emit_tetra_sum(['#' + name + '/sh_flags']) - if zero_addresses: t.emit_tetra(0) + if zero_addresses: t[::4] = 0 else: t.emit_tetra_sum(['&' + name]) t.emit_tetra_sum(['!' + name]) t.emit_tetra_sum(['#' + name + '/sh_size']) @@ -420,10 +420,10 @@ ofs = this._strtab.emit_entry(pname[1:]) # No explicit alignment. .symtab doesn't bear padding; if # you get it out of align, you're out of luck anyway. - this.emit_tetra(ofs) + this[::4] = ofs if value == None: this.emit_tetra_sum([pname]) - else: this.emit_tetra(value) - this.emit_tetra(0) # st_size + else: this[::4] = value + this[::4] = 0 # st_size this[::1] = STB.GLOBAL << 4 | STT.NOTYPE this[::1] = 0 # st_other; reserved this[::2] = section @@ -437,9 +437,8 @@ i = symtab.emit_entry(pname, value = 0, section = SHN.UNDEF) # No explicit alignment. .rel* don't bear padding; if # you get it out of align, you're out of luck anyway. - rel.emit_tetra(offset) - rel.emit_tetra((i << 8) | type) - if addend <> None: rel.emit_tetra(addend) + rel[::4] = offset, (i << 8) | type + if addend <> None: rel[::4] = addend def infer_by_prefix (name, dict): for l in range(len(name), -1, -1): |