-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dyn sym refactor #71
Dyn sym refactor #71
Conversation
added portable executable support.
changed the install.sh to install more cross compilers
… files were given the name 'g++'. This might have broken the test test_cwe248.py.
… test_compiling
…licated warning output
… symbol_checking
… symbol_checking
…te and used generate_tid_map functionality. added api support to cwe caller. improved overall code quality of the caller. (removing duplicate code)
Removed the tid map generator call from the external function builder and added it as a parameter
… function Added functionality to detect binary file format (ELF/PE) in CConv Soon: - adding distinction between parameters of elf and pe binaries in Cconv
Adapted the functionality for register retrieval in the Cconv module. Reduced code redundancy.
Removed reference to example project in address_translation_test.mli
… juilet_testing
… run with a certain binary
… unittest_flexibility
…te changes in the Makefile Changed mips64 to mips64el in SConstruct
Made the compilation of test files compatible with travis Added a new script containing test files to be compiled for unit test
… extended_cconv_tests
… dyn_sym_refactor
Added a check for resolving external symbols Added unittest for symbol_utils Changed Cconv references to Symbol_utils for parse_dyn_syms
src/utils/symbol_utils.ml
Outdated
|
||
let check_if_symbols_resolved (project : Project.t) (program : program term) (tid_map : word Tid.Map.t) : bool = | ||
let extern = build_and_return_extern_symbols project program tid_map in | ||
let extern = List.filter extern ~f:(fun e -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you give the variable e
a more meaningful name? When it comes to readability of code, one-letter names are almost never a good idea.
src/utils/symbol_utils.ml
Outdated
match Stdlib.List.mem e.name extern_symbol_blacklist with | ||
| false -> true | ||
| true -> false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ocaml has a not
operator for boolean values, you don't need to match them to invert them.
src/utils/symbol_utils.ml
Outdated
let not_resolved = List.filter extern ~f:(fun e -> | ||
match Stdlib.List.mem e.tid calls with | ||
| true -> false | ||
| false -> true | ||
) in | ||
match List.length extern = List.length not_resolved with | ||
| true -> false | ||
| false -> true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the two comments above.
src/utils/symbol_utils.mli
Outdated
val get_calls : Bap.Std.program Bap.Std.term -> (Bap.Std.tid * Bap.Std.tid) list | ||
|
||
val check_if_symbols_resolved : Bap.Std.Project.t -> Bap.Std.program Bap.Std.term -> Bap.Std.word Bap.Std.Tid.Map.t -> bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pleas add doc comments for the two functions.
Also added doc strings to two new functions
No description provided.