diff python/ppci/objectfile.py @ 342:86b02c98a717 devel

Moved target directory
author Windel Bouwman
date Sat, 01 Mar 2014 15:40:31 +0100
parents d1ecc493384e
children 9667d78ba79e
line wrap: on
line diff
--- a/python/ppci/objectfile.py	Fri Feb 28 18:07:14 2014 +0100
+++ b/python/ppci/objectfile.py	Sat Mar 01 15:40:31 2014 +0100
@@ -17,6 +17,8 @@
 
 
 class Relocation:
+    """ Represents a relocation entry. A relocation always has a symbol to refer to
+     and a relocation type """
     def __init__(self, sym, offset, typ, section):
         self.sym = sym
         self.offset = offset
@@ -64,6 +66,7 @@
         return sym
 
     def add_relocation(self, sym_name, offset, typ, section):
+        assert type(sym_name) is str, str(sym_name)
         assert section in self.sections
         reloc = Relocation(sym_name, offset, typ, section)
         self.relocations.append(reloc)