I have binary A , which is a debug assembly with accompanying symbols, created many years ago. I also have binary B , a compilation without accompanying characters, and much more recent. I'm looking for the most efficient method of mapping symbols of a binary A potential candidates in binary Bed and .
Given that debugging collection is significantly larger (doing a lot of input validation, printing more things before stderr, etc.) and that functions invariably change over time, I believe that trying to fingerprint individual functions will be wasted.
So I decided - completely out of thin air, so I could bark the wrong tree - the best way to print these functions is to create call schedules for both binary files and try to combine the vertices (i.e. the functions).
I already did some preprocessing, so I have the following data structures:
# binary A
[[60, 60, 8734], # function 0 is called by functions 60 (twice) and 8734
[193, 441, 505], # function 1 is called by functions 193, 441 and 505
[193, 742],
[23],
[21],
[21],
[26],
[26, 1508, 1509, 1573],
[24],
[25],
...] # (~10k functions)
# binary B
[[8999], # function 0 is called by function 8999
[9016], # function 1 is called by function 9016
[1126],
[7904, 7904, 7913],
[182, 336, 396, 396],
[9010],
[407],
[182, 632],
[20],
[24],
...] # (~10k functions)
It is important to note that there is a match there is between the function of "0" in binary A and the function of "0" in binary Bed and . These are arbitrary identifiers that I assigned to each function in each binary.
- , . -fu , . ( ) , . , Ai → Bi -?
, A , , , . :
[[(37, 0.998), (8432, 0.912), (442, 0.75)], # matching-ness of function "0" in binary A with function "37" in binary B is 0.998, second most likely candidate is function "8432" in binary B with score 0.912, etc.
[(42, 0.973), (7751, 0.788)], # matching-ness of function "1" in binary A with function "42" in binary B is 0.973, second most likely candidate is function "7751" in binary B with score 0.788, etc.
[(4579, 0.996), (123, 0.934)],
...] # around ~10k mappings
, , , , .
SO-goers , ?