Created
August 27, 2020 21:20
-
-
Save jtpaasch/67b189128b77db13002dd003616fbdad to your computer and use it in GitHub Desktop.
Custom BAP loader
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
module Loader = struct | |
let empty_with_program filename prog = | |
let arch = `unknown and code = Memmap.empty and data = Memmap.empty in | |
Project.Input.create arch filename ~code ~data | |
~finish:(fun proj -> Project.with_program proj prog) | |
let load filename = | |
let prog = Program.create () in (* empty prog for now *) | |
empty_with_program filename prog | |
end | |
let () = Project.Input.register_loader "my-loader" Loader.load | |
(* Compile with [bapbuild my_bap_loader.plugin && bapbundle install my_bap_loader.plugin] *) | |
(* Clean with [bapbundle remove my_bap_loader.plugin && bapbuild clean my_bap_loader.plugin] *) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment