Please sign in to comment.
improves relocations handling (#768)
* added a relocatabale reconstructor * work in progress * it's working!! * refactored relocator * refactoring * added Bap_relocator Technicaly, we may add this module to plugin, but will also have to update api pligin dependencies in register_pass function, since api should be applied after all relocations resolving * work in progress * it's working! * made the relocatable bracnher the default one! * lot's of debug code in Rel_reconstructor. Last commit for him * removed rel_reconstructor, rel_fact * refactoring bap_relocator * refactoring * removed wrong dependency * adds a cfg to IR lifting function We still have a problem, that bil doesn't reflect jump instruction destinations in case of relocations presence. This leads to wrong IR program. One of possible solutions is to add a whole program cfg into sema lift functions for destinations search. Once we did it, we don't need to think about local relocations at all - only about external symbols * added cfg again * renamed Bap_relocator to Bap_inject_externals * added to symtab `find_call` and `add_call` * refactoring * identation * fixed bug with calls discovering * resolved jump as calls with no return * just fix doc * moved everything toa plugin * removed unused + refactored * refactoring * removed unused * lot's of changes Added to Symtab functions `add_callee` and `find_callee`. It became possible to add a name of callee side in Reconstructor. It's useful for detection of external calls while lifting to IR. * wip * made it workable added to sema_lift a lookup of callees of indirect calls * updated testsuite * review accepted * just remove unnecessary changes * edited typo * fixed docs again * refactored brancher * updated testsuite * fixed a bug with cross section call let's harden a resolving of external functions and check indirect calls against addresses in symtab too: if address is in symtab, then such call can't be external * refactoring * updated documentation * fixed predicate for resolving jumps
- Loading branch information...
Showing with 314 additions and 400 deletions.
- +3 −16 lib/bap/bap_project.ml
- +0 −142 lib/bap/bap_synthetic_symbolizer.ml
- +0 −6 lib/bap/bap_synthetic_symbolizer.mli
- +91 −5 lib/bap_disasm/bap_disasm_brancher.ml
- +0 −15 lib/bap_disasm/bap_disasm_rec.ml
- +50 −21 lib/bap_disasm/bap_disasm_reconstructor.ml
- +12 −1 lib/bap_disasm/bap_disasm_symtab.ml
- +6 −0 lib/bap_disasm/bap_disasm_symtab.mli
- +76 −61 lib/bap_sema/bap_sema_lift.ml
- +1 −1 oasis/bap-std
- +1 −1 oasis/relocatable
- +4 −0 plugins/relocatable/.merlin
- +0 −103 plugins/relocatable/rel_brancher.ml
- +67 −0 plugins/relocatable/rel_symbolizer.ml
- +0 −26 plugins/relocatable/relocatable_main.ml
- +2 −1 src/bap_cmdline_terms.ml
- +1 −1 testsuite
Oops, something went wrong.