Repository navigation
PE: Read base relocations without pefile. - #887
Merged
Merged
Conversation
pefile builds several objects per base relocation entry; on OUTLOOK.EXE (234k entries) the parse took 1.1-1.5 s and registering the relocations another 0.8 s. Reading the blocks directly and resolving the relocation class once per type takes both down to 0.15 s. The reader keeps pefile's stopping rules, and the relocations are identical on all 129 PE binaries in the test corpus.
A HIGHADJ entry's following slot holds the low 16 bits of the 32-bit value, but the backend passed the entry's own address as the low half. The value is also now computed like the Windows loader does (signed low half, rounded to the nearest high half) and written as 16 bits instead of 32, which clobbered the next two bytes.
Member
|
Corpus decompilation diffs can be found at angr/dec-snapshots@master...angr/cle_887 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.