Skip to content

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. #21

Description

@elfmaster

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions