-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
injector: Prototype patchspec implementation
Patch specification is read from `bakatsugi` section of patchlib elf file. A patchlib is a normal shared library with the extra section containing patch metadata. A helper C header is included in `c/bakatsugi.h`
- Loading branch information
Showing
2 changed files
with
78 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#ifndef BAKATSUGI_H | ||
#define BAKATSUGI_H | ||
#define BAKATSUGI(__X) const char __bakatsugi_patches[] __attribute__((section("bakatsugi"))) = __X; | ||
#define PATCH_OWN(orig, replace) "O" #orig "." #replace "\n" | ||
#define PATCH_LIB(orig, replace) "L" #orig "." #replace "\n" | ||
#endif |