Sometimes, we will end up with the (compiled) patch assembly that contains conditional branches to targets that are out of range (and we get an error from the system assembler indicating this). Our previous solution consisted of a pass in vibes-opt to correct this, but it is premature, sometimes leading to false positives as well as false negatives.
The truth is that we cannot perform this step until we try to situate the patch somewhere in the binary, and indeed a production-grade compiler would perform this step very late in the pipeline. So, this PR attempts to do the same.
Sometimes, we will end up with the (compiled) patch assembly that contains conditional branches to targets that are out of range (and we get an error from the system assembler indicating this). Our previous solution consisted of a pass in
vibes-opt
to correct this, but it is premature, sometimes leading to false positives as well as false negatives.The truth is that we cannot perform this step until we try to situate the patch somewhere in the binary, and indeed a production-grade compiler would perform this step very late in the pipeline. So, this PR attempts to do the same.