#!/usr/bin/env python

import sys
sys.path.append("./") # heh...

import Elf
import code

Elf.verbose = True
elf = Elf.Elf(sys.argv[1])
#bytes = file(sys.argv[1]).read(64)
#elf = Elf.Elf(bytes)

last = 0
for sec in elf.sections:
    #print "pad: ",sec.sh_offset-last
    print sec
    last = sec.sh_offset+sec.sh_size

for pgm in elf.pheaders:
    print pgm

mylocal = { "elf":elf }

elf.serialize("test1")

code.interact(local=mylocal)
