It is needed to find a trick to compare two function to be same.
Same - means same assembly instructions.
There is no way to do it because compiler can make partial functions and so on.
Probable solution:
There are no RET instructions in the middle of the function, there are no JMP instructions.
Then function can be compared binary as is.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
>It is needed to find a trick to compare two function to be same.
Why we need this? How this can help?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-07-28
It is needed to prove that functions are binary equal.
For example VC linker can optimize equal functions to one function, so the check may be just compare the address.
GCC can do it too with -ffunction-sections but some other compilers may not do it.
(I do not write in russian to help some non russian people to understand the conversation :) )
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think that you should compare things the the function code affect, not the code itself. you should check Binary File size, and program speed. That will give you a good estimate.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2007-07-28
Too much huristics.
IMHO I should check GCC flag for compacting functions.
If it works, I can rely on the same address for most cases.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It is needed to find a trick to compare two function to be same.
Same - means same assembly instructions.
There is no way to do it because compiler can make partial functions and so on.
Probable solution:
There are no RET instructions in the middle of the function, there are no JMP instructions.
Then function can be compared binary as is.
>It is needed to find a trick to compare two function to be same.
Why we need this? How this can help?
It is needed to prove that functions are binary equal.
For example VC linker can optimize equal functions to one function, so the check may be just compare the address.
GCC can do it too with -ffunction-sections but some other compilers may not do it.
(I do not write in russian to help some non russian people to understand the conversation :) )
I think that you should compare things the the function code affect, not the code itself. you should check Binary File size, and program speed. That will give you a good estimate.
Too much huristics.
IMHO I should check GCC flag for compacting functions.
If it works, I can rely on the same address for most cases.