lib/pedump/loader.rb
def io va
    section = va2section(va)
    raise "no section for va=0x#{va.to_s 16}" unless section
    offset = va - section.va
    raise "negative offset #{offset}" if offset < 0
    StringIO.new(section.data).tap{ |io| io.seek offset }
  end
# returns StringIO with section data, pre-seeked to specified VA
# TODO: make io cross sections
returns StringIO with section data, pre-seeked to specified VA
TODO: make io cross sections
returns StringIO with section data pre - seeked to specified VA TODO : make io cross sections
def io va
    section = va2section(va)
    raise "no section for va=0x#{va.to_s 16}" unless section
    offset = va - section.va
    raise "negative offset #{offset}" if offset < 0
    StringIO.new(section.data).tap{ |io| io.seek offset }
  end
def io va section = va2section ( va ) raise "no section for va=0x#{va.to_s 16}" unless section offset = va - section . va raise "negative offset #{offset}" if offset < 0 StringIO . new ( section . data ) . tap { | io | io . seek offset } end
returns StringIO with section data, pre-seeked to specified VA
TODO: make io cross sections
returns StringIO with section data pre - seeked to specified VA TODO : make io cross sections
va