[Wisp-cvs] wisp/users/dig elf.py,1.20,1.21
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2003-04-12 18:48:29
|
Update of /cvsroot/wisp/wisp/users/dig In directory sc8-pr-cvs1:/tmp/cvs-serv3165 Modified Files: elf.py Log Message: wrote emit_ELF32_reloc_entry Index: elf.py =================================================================== RCS file: /cvsroot/wisp/wisp/users/dig/elf.py,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- elf.py 12 Apr 2003 16:30:57 -0000 1.20 +++ elf.py 12 Apr 2003 18:48:22 -0000 1.21 @@ -406,6 +406,15 @@ symtab.emit_byte(0) # st_other; reserved symtab.emit_wyde(section) +# Note: all entries in a single relocation section +# must either have or not have explicit addends. +def emit_ELF32_reloc_entry (rel, offset, type, symind, addend = None): + # No explicit alignment. .rel* doesn't bear padding; if + # you get it out of align, you're out of luck anyway. + rel.emit_tetra(offset) + rel.emit_tetra((symind << 8) | type) + if addend <> None: rel.emit_tetra(addend) + def infer_by_prefix (name, dict): for l in range(len(name), -1, -1): prefix = name[:l] |