-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Data.Macaw.PPC: add classifier to handle pc-relative loads for reloca…
…table code To do PC-relative reads for relocatable code, PPC binaries will use the `bl` instruction to jump to the next address in order to read the PC into the link register. This is incorrectly classified as a function call by the default classifier. This adds an additional classifier to PPC that specifically checks for this case (i.e. a `bl` to the subsequent address) and instead treats it like a normal jump, where the LR is concretely known to be the PC at the jump target. It is unlikely that binaries would have this pattern but intend it to be treated like a normal function call. Nevertheless, this would be a breaking change for such a binary if it existed and would require refining this classifier further in order to distinguish this case.
- Loading branch information
1 parent
c2c2a3d
commit 9b1b120
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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