Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv23477
Modified Files:
elf.py
Log Message:
use new, clearer syntax
Index: elf.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- elf.py 27 Apr 2003 20:18:06 -0000 1.52
+++ elf.py 6 May 2003 16:22:58 -0000 1.53
@@ -367,7 +367,7 @@
t = Linkie(byte_order)
t.align(4)
t |= '!elf/secthdr'
- t.emit_string('\0' * 40) # the null entry
+ t[::4] = (0,) * 10 # the null entry
for name in names:
t[::4] = '#.shstrtab/strings/' + name
t[::4] = '#' + name + '/sh_type'
@@ -405,7 +405,7 @@
Linkie.__init__(this, byte_order)
this._strtab = strtab
this.align(4)
- this.emit_string('\0' * 16)
+ this[::4] = 0, 0, 0, 0
this._index = 0 # for pre-increment
# Returns index of the entry added.
def emit_entry (this, pname, value = None, section = SHN.ABS):
@@ -413,7 +413,7 @@
# No explicit alignment. .symtab doesn't bear padding; if
# you get it out of align, you're out of luck anyway.
this[::4] = ofs
- if value == None: this.emit_tetra_sum([pname])
+ if value == None: this[::4] = pname
else: this[::4] = value
this[::4] = 0 # st_size
this[::1] = STB.GLOBAL << 4 | STT.NOTYPE
|