add: maps hiding (#13)

This commit adds maps hiding. This commit is taken from Reveny's PR, for more information, see #9.

solves #9
This commit is contained in:
Pedro.js
2024-06-26 19:38:34 -03:00
committed by GitHub
parent 4aa8b2f828
commit af96b85a91
6 changed files with 563 additions and 7 deletions

View File

@@ -161,7 +161,7 @@ fn load_modules(arch: &str) -> Result<Vec<Module>> {
fn create_library_fd(so_path: &PathBuf) -> Result<OwnedFd> {
let opts = memfd::MemfdOptions::default().allow_sealing(true);
let memfd = opts.create("jit-cache")?;
let memfd = opts.create("jit-cache-zygisk")?;
let file = fs::File::open(so_path)?;
let mut reader = std::io::BufReader::new(file);
let mut writer = memfd.as_file();