Skip to content

Improve PE handling for virtual address lookups #882

Description

@philipc

Currently we do a linear scan of the section table to find the data for a virtual address. This is fine when address lookups are rare. However, some data structures (e.g. PE import tables) have lots of addresses to look up. We handle this by only doing one lookup for the starting address, and requiring all subsequent addresses to be in the same section, but this restriction doesn't match the Windows loader. #881 adds a workaround for one problem that arises with PE import tables. A better fix would be to do a lookup for every address in the import table, but then we start wanting to do something better than a linear scan, e.g an interval tree. This probably would need to do lazy loading of the section data, so that we don't force loading the entire file for ReadCache users.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions