Example #1
0
 def InitFromFile(self, f, count):
     x = 0
     while x < count:
         symbol = coffSymbolEntry()
         symbol.InitFromFile(f)
         x += 1 + symbol.NumberAuxiliary  #account for aux stubs
         self.append(symbol)
Example #2
0
File: coff.py Project: abael/pyasm
 def InitFromFile(self, f, count):
     x = 0
     while x < count:
         symbol = coffSymbolEntry()
         symbol.InitFromFile(f)
         x += 1 + symbol.NumberAuxiliary #account for aux stubs
         self.append(symbol)          
Example #3
0
File: coff.py Project: abael/pyasm
    def AddSymbol(self,name="",value=0x0,sec=0x0,typ=0x0,cls=0x0,aux=''):
##        fullname = name
##        if len(name) > 8: #add name to symbol table and reference
##            if name[-1] != '\x00':
##                name += '\x00'
##            pos = len(self.StringTable) + 4
##            self.StringTable += name
##            name = '\x00\x00\x00\x00' + ulongToString(pos)        
        self.AddExistingSymbol(coffSymbolEntry(name,value,sec,typ,cls,aux))#,fullname))
Example #4
0
 def AddSymbol(self, name="", value=0x0, sec=0x0, typ=0x0, cls=0x0, aux=''):
     ##        fullname = name
     ##        if len(name) > 8: #add name to symbol table and reference
     ##            if name[-1] != '\x00':
     ##                name += '\x00'
     ##            pos = len(self.StringTable) + 4
     ##            self.StringTable += name
     ##            name = '\x00\x00\x00\x00' + ulongToString(pos)
     self.AddExistingSymbol(coffSymbolEntry(name, value, sec, typ, cls,
                                            aux))  #,fullname))