Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv18848/users/dig
Modified Files:
linkie.py
Log Message:
retabbed elf.py
Index: linkie.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- linkie.py 1 Apr 2003 08:03:00 -0000 1.21
+++ linkie.py 12 Apr 2003 11:10:51 -0000 1.22
@@ -242,7 +242,7 @@
# Returns the offset of /that/ inside /this/ after extension.
if this._unresolved_locals: raise 'Incomplete linkie', this
if that._unresolved_locals: raise 'Incomplete linkie', that
- this._origin = 0
+ this._origin = 0
if that.filesz(): this.deskip()
this.align(that._alignment)
delta = this.memsz() - that._origin
@@ -260,48 +260,48 @@
return delta
def paste (this, offset, that):
# Pastes /that/ into /this/ at specified /offset/ (if negative
- # /offset/ is treated as an alignment restriction and the actual
- # offset is automatically calculated from that).
- # Note that the specified alignment of /that/ is IGNORED.
- # Origin of /this/ *should* be zero.
+ # /offset/ is treated as an alignment restriction and the actual
+ # offset is automatically calculated from that).
+ # Note that the specified alignment of /that/ is IGNORED.
+ # Origin of /this/ *should* be zero.
if this._unresolved_locals: raise 'Incomplete linkie', this
if that._unresolved_locals: raise 'Incomplete linkie', that
- # provide sufficient padding
- if offset < 0: this.align(- offset)
- else: this.skip(offset - this.memsz())
+ # provide sufficient padding
+ if offset < 0: this.align(- offset)
+ else: this.skip(offset - this.memsz())
- # convert any padding to hard zeroes if needed
+ # convert any padding to hard zeroes if needed
if that.filesz(): this.deskip()
# remember the start offset of /that/
- thatofs = this.memsz()
+ thatofs = this.memsz()
# carry over all the bits
this._binary.extend(that._binary)
this._skipped = that._skipped
- # carry over and process the symbols
+ # carry over and process the symbols
for sym, val in that._symbols:
- if sym[0] == '!':
- this._symbols.append((sym, val + thatofs))
- elif sym[0] in '#&':
+ if sym[0] == '!':
+ this._symbols.append((sym, val + thatofs))
+ elif sym[0] in '#&':
this._symbols.append((sym, val))
else:
- raise 'unprefixed symbol', sym
+ raise 'unprefixed symbol', sym
# carry over the linker notes
for ofs, typ, arg in that._linker_notes:
this._linker_notes.append((ofs + thatofs, typ, arg))
- # return nothing
+ # return nothing
def __add__ (this, that):
this = this.copy()
this.extend(that)
return this
def link (this):
- symbols = this.get_symbol_dict()
+ symbols = this.get_symbol_dict()
i = len(this._linker_notes)
while i > 0:
i = i - 1
|