DynamoRIO / DynamoRIO/dynamorio

use in-fragment mangling to avoid the IBL for OP_blx

Open
#1,612 0 comments 0 reactions 0 assignees View on GitHub
help wanted OpSys-ARM Performance Type-Feature
Dominant language
C
Stars
3.2k
Forks
629
Avg merge
2d 15h
Merged PRs (30d)
31

Description

Once we've implemented far-through-stub linking, we should switch OP_blx to
use it instead of ibl:

```
/* Unfortunately while there is OP_blx with an immed, OP_bx requires
* indirection through a register. We thus need to swap modes separately,
* but our ISA doesn't support mixing modes in one fragment, making
* a local "blx next_instr" not easy. We have two potential solutions:
* A) Implement far linking through stub's "ldr pc, [pc + 8]" and use
* it for blx. We need to implement that anyway for reachability,
* but as it's not implemented yet, I'm going w/ B) for now.
* B) Pretend this is an indirect branch and use the ibl.
* This is slower so FIXME i#1612: switch to A once we have far links.
*/
```

Except we do need to set the dcontext isa mode: but can do that in-fragment w/
mangling, right? Though what if we get a fault?

Xref #1611 eliminating through-stub linking: but it would leave
load-into-PC as the exit cti, so presumably we could still do the ISA
change as mangling code.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.