Open 1superchip opened 3 days ago
I have not seen a great place to insert the code that compares 2 symbols to each other. It seems like the best place would be somewhere in https://github.com/simonlindholm/asm-differ/blob/main/diff.py#L3140. Any thoughts on where the code should be added?
Yes, I think that's exactly the place to add it. Maybe and field_matches_any_symbol(nf, config.arch)
could be and (field_matches_any_symbol(nf, config.arch) or ...)
?
Function static symbols are appended with a number to prevent name collisions with other symbols with the same names.
asm-differ currently matches MWCC literals with the format of
@num
to any other symbol with the same format. The number appended to the name is internally generated by the compiler for both instances making the numbers irrelevant when matching code. Ignoring differences for function static symbols would make the symbol handling similar in both cases.asm-differ currently flags the entire symbol as different when the number differs but the name is the same. Different compilers handle the symbol differently. GCC emits a
.
as the separator while MWCC emits a$
.MWCC:
l_matDL$5761
GCC:
cnt.1
I have not seen a great place to insert the code that compares 2 symbols to each other. It seems like the best place would be somewhere in https://github.com/simonlindholm/asm-differ/blob/main/diff.py#L3140. Any thoughts on where the code should be added?