Patches/LLVM: Implement Complex Patches Support

This commit is contained in:
Eladash 2021-08-23 16:21:49 +03:00 committed by kd-11
parent 2d9929059f
commit ddb042148d
3 changed files with 108 additions and 8 deletions

View file

@ -26,6 +26,7 @@ enum class patch_type
{
invalid,
load,
alloc, // Allocate memory at address (zeroized executable memory)
byte,
le16,
le32,
@ -85,6 +86,15 @@ public:
std::string version{};
};
enum mem_protection : u8
{
wx = 0, // Read + Write + Execute (default)
ro = 1, // Read
rx = 2, // Read + Execute
rw = 3, // Read + Write
mask = 3,
};
using patch_map = std::unordered_map<std::string /*hash*/, patch_container>;
patch_engine();