shiva_tf_relink_local_branch_x86_64 re-writes short branch with offset that becomes negative in splice patches larger than 127 bytes in length.
In short... the two byte instruction "\x74\0x00" can only hold a one byte offset. If it goes beyond 127 bytes than it becomes a negative offset and the 'je' instruction jumps to an invalid location.
Shiva needs to calculate which local branches will need to be re-written from a "Short branch" to a "Near branch" and then rewrite
shiva_tf_relink_local_branch_x86_64 re-writes short branch with offset that becomes negative in splice patches larger than 127 bytes in length.
In short... the two byte instruction "\x74\0x00" can only hold a one byte offset. If it goes beyond 127 bytes than it becomes a negative offset and the 'je' instruction jumps to an invalid location.
Shiva needs to calculate which local branches will need to be re-written from a "Short branch" to a "Near branch" and then rewrite