asm-differ icon indicating copy to clipboard operation
asm-differ copied to clipboard

Multiple text sections in the diff can lead to incorrect arrows

Open 1superchip opened this issue 8 months ago • 0 comments

In diffs that contain multiple text sections (such as MSVC emitting a text section per function with /O2), branch arrows show up in all sections as long as the address exists.

https://decomp.me/scratch/BDXEV

In the first section, there is only 1 branch (6 -> b) but there is an additional arrow at f. The second section has 2 branches (d -> 16) and (14 -> f) but there is an additional arrow at b` from the previous section. Image

Other architectures can have this problem too. Here is an example of PPC MWCC emitting multiple text sections which causes additional arrows in each section.

https://decomp.me/scratch/Cwps6 Functions having the same address in the diff. Image

No branch in the first function leads to this address. Image

Branch arrows should not be shown in unrelated functions due to being in different sections.

1superchip avatar Apr 30 '25 15:04 1superchip