You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was manually calculating offsets for jump targets and running into issues before realizing that Keystone was assembling my immediates as if they were absolute.
For example, in armv7, the branch (b) instruction uses relative addressing.
I would expect
b 0x1234
to jump to pc + 0x1234, but Keystone instead acts as if I want to jump to 0x1234 and effectively replaces it with an entirely different offset. (This of course only occurs when using a non-zero starting address). While very convenient, it's surprising and unintuitive.
Is there a way to explicitly control this behavior? Can I continue to integrate with keystone under the assumption that this isn't a bug from accidentally treating an immediate like a parsed label?
The text was updated successfully, but these errors were encountered:
Probably due to #108, not sure if this "fix" is intended (though very much appreciated, if integrated correctly.). Either way it's non-obvious with no documentation other than an offhand vague mention in powerpoint. Also causes issues like #568
I was manually calculating offsets for jump targets and running into issues before realizing that Keystone was assembling my immediates as if they were absolute.
For example, in armv7, the branch (b) instruction uses relative addressing.
I would expect
to jump to pc + 0x1234, but Keystone instead acts as if I want to jump to 0x1234 and effectively replaces it with an entirely different offset. (This of course only occurs when using a non-zero starting address). While very convenient, it's surprising and unintuitive.
Is there a way to explicitly control this behavior? Can I continue to integrate with keystone under the assumption that this isn't a bug from accidentally treating an immediate like a parsed label?
The text was updated successfully, but these errors were encountered: