Update of /cvsroot/wisp/wisp/users/dig
In directory sc8-pr-cvs1:/tmp/cvs-serv18782
Modified Files:
elf.py linkie.py
Log Message:
create linkies for relocation sections as needed when generating relocatable object files
Index: elf.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- elf.py 14 Apr 2003 00:44:40 -0000 1.29
+++ elf.py 14 Apr 2003 00:52:39 -0000 1.30
@@ -508,6 +508,16 @@
sections['.symtab'] = Linkie('<')
sections['.symtab'].align(4)
sections['.symtab'].emit_string('\0' * 16)
+ if want_relocatable:
+ if text.note_count():
+ shentnames.append('.rel.text')
+ sections['.rel.text'] = Linkie('<')
+ sections['.rel.text'].align(4)
+ if data.note_count():
+ shentnames.append('.rel.data')
+ sections['.rel.data'] = Linkie('<')
+ sections['.rel.data'].align(4)
+
shentnames.append('.shstrtab')
sections['.shstrtab'] = Linkie('<')
sections['.shstrtab'].emit_byte(0)
Index: linkie.py
===================================================================
RCS file: /cvsroot/wisp/wisp/users/dig/linkie.py,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- linkie.py 14 Apr 2003 00:21:58 -0000 1.23
+++ linkie.py 14 Apr 2003 00:52:40 -0000 1.24
@@ -225,6 +225,11 @@
Returns a list of the linker notes from the linkie."""
if this._unresolved_locals: raise 'Incomplete linkie', this
return this._linker_notes[:]
+ def note_count (this):
+ """note_count() -> integer
+ Returns length of the linker note list of this linkie."""
+ if this._unresolved_locals: raise 'Incomplete linkie', this
+ return len(this._linker_notes)
def get_origin (this):
return this._origin
|