-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert instruction patch, lang="C" via copy-and-micropatch strategy #31
Merged
DennyDai
merged 31 commits into
purseclab:copy-and-micropatch
from
draperlaboratory:main
May 21, 2024
Merged
Insert instruction patch, lang="C" via copy-and-micropatch strategy #31
DennyDai
merged 31 commits into
purseclab:copy-and-micropatch
from
draperlaboratory:main
May 21, 2024
Conversation
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
… InsertInstructionPatch with C code now working.
…ted inline assembly moves to allow the programmer to modify extra registers not allowed by the calling convention.
…xtra registers not provided for in the calling convention. Added debug logging for generated C code
…alling convention
…ed InsertInstructionPatch C to readme table
…P C now links correctly against external symbols. Added asm_header and asm_footer feature.
…e programs this is okay to do
…ng tacked onto the .text section
…longer necessary due to upstream bugfix just merged.
…cture. Added aarch64 iip_c demo program.
…ed stubs to target.py
Thank you so much for making this happen! I've tested it locally on my end, and it's working perfectly. Thanks again for your help in getting this done! |
Everything is in good shape now. I'm just currently waiting for the cle fix (#30) to reach PyPI, then I will merge it into the main branch! |
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.
This pull request adds the features discussed in issue #24. Current implementation fully supports x86-64 via the clang-19
preserve_none
flag. The current trunk build from https://apt.llvm.org/ works okay. Make sure that you have the latest version of clang-19, as the calling convention for x86-64 recently changed in the trunk.This pull request also adds support for aarch64/ARM64, even though
preserve_none
is not implemented for that platform yet. The calling convention and the use ofregister
annotations is sufficient enough to provide a useful micropatch strategy. Oncepreserve_none
lands for this platform, the support for aarch64 inREADME.md
should be marked as "fully functional." Currently it is marked as "limited functionality."Also included are test cases for the new strategy.
To view examples of how to use this new micropatch strategy, see the
examples/insert_instruction_patch_c
folder.