Skip to content

feat(pe): add parse_imports option to ParseOptions#522

Open
supervacuus wants to merge 1 commit intom4b:masterfrom
supervacuus:feat/add_parse_imports_pe_option
Open

feat(pe): add parse_imports option to ParseOptions#522
supervacuus wants to merge 1 commit intom4b:masterfrom
supervacuus:feat/add_parse_imports_pe_option

Conversation

@supervacuus
Copy link
Copy Markdown

@supervacuus supervacuus commented Mar 27, 2026

Parsing PE import tables is expensive: for each DLL, the parser does a full pass over the import lookup table (resolving every symbol RVA via a linear scan over sections), a second pass over the import address table, and then a third reshaping pass in Import::parse. For binaries with large or malformed import tables, this adds up fast, especially when the caller only needs headers, debug info, or exports.

This PR adds a parse_imports flag to ParseOptions (default: true) with a with_parse_imports builder method, allowing callers to skip import table parsing entirely. When set to false, import_data, imports, and libraries remain empty while everything else is parsed as usual.

This is a follow-up to #506 (#508).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant