示例#1
0
文件: elf.py 项目: 0xtob/Stachelfish
 def toBinArray(self):
   ba = BinArray()
   for d in self.dyntab:
     ba.extend(d.toBinArray())
   null = struct.pack("<Q", DT_NULL)
   ba.fromstring(null)
   return ba
示例#2
0
文件: elf.py 项目: 0xtob/Stachelfish
  def toBinArray(self):
    if self.readonly:
      return BaseSection.toBinArray()

    ba = BinArray()
    keys = self.by_index.keys()
    keys.sort()
    for k in keys:
      ba.fromstring(self.by_index[k] + "\0")
    return ba
示例#3
0
文件: elf.py 项目: 0xtob/Stachelfish
 def toBinArray(self):
   ba = BinArray()
   ba.fromstring(struct.pack(self.format, self.d_tag, self.d_val))
   return ba