The embodiment of the invention provides a
binary translation method, a binary translator,
electronic equipment and a readable storage medium, and the method comprises the steps: mapping a first virtual page to a second virtual page in a shared mapping mode under the condition that it is determined that a self-modification code is detected; the first virtual page is a virtual page where a write address of the self-modification code is located; the second virtual page and the first virtual page correspond to the same physical page; the permission of the first virtual page is unwritable, and the permission of the second virtual page is writable; searching the translated target
basic block according to the write address of the self-modification code, and modifying the effective flag bit of the target
basic block to be invalid; and based on the write address of the self-modifying code, writing the self-modifying code in a corresponding position in the second virtual page. According to the embodiment of the invention, the self-modification operation is completed with smaller
granularity and lower cost, redundant invalid operations can be reduced, redundant re-translation operations can be reduced, and the performance of a
translation system is improved.