Select Git revision
-
Andreas Ziegler authored
Besides calls between libaries (i.e., library A imports library B and calls a function in B) we also need to keep track of calls inside the respective libraries (an exported function inside library B can call another exported function). In order to generate these call graphs, this change uses capstone to disassemble all exported functions (defined by their address ranges) and checks all jump and call instructions if they point to a known exported function. The current release of capstone fails to disassemble instructions with the 0x66 prefix as well as movsxd instructions; in this case we use a fallback to objdump to disassemble this code and 'parse' it via regular expressions - this pattern is quite rare, so it should not have a too great impact on performance but gives us more exact results.
Andreas Ziegler authoredBesides calls between libaries (i.e., library A imports library B and calls a function in B) we also need to keep track of calls inside the respective libraries (an exported function inside library B can call another exported function). In order to generate these call graphs, this change uses capstone to disassemble all exported functions (defined by their address ranges) and checks all jump and call instructions if they point to a known exported function. The current release of capstone fails to disassemble instructions with the 0x66 prefix as well as movsxd instructions; in this case we use a fallback to objdump to disassemble this code and 'parse' it via regular expressions - this pattern is quite rare, so it should not have a too great impact on performance but gives us more exact results.