Skip to content

Comments

Handle (some) PLT type functions in libInterceptor.#2416

Merged
pmuetschard merged 6 commits intogoogle:masterfrom
pmuetschard:plt
Dec 5, 2018
Merged

Handle (some) PLT type functions in libInterceptor.#2416
pmuetschard merged 6 commits intogoogle:masterfrom
pmuetschard:plt

Conversation

@pmuetschard
Copy link
Member

Implemented for armeabi-v7 and arm64-v8, if the first instruction of the function is an unconditional branch, attempt to modify the target of that branch instead of the original function. Thus the codepath will be:

App->driver->branch->trampoline->spy->compensation function->driver

See #355

The workaround is broken, because of linker namespaces not allowing
loading `/system/lib/libhwgl.so` anyways.
... and clang-format them.
The order in the code was reversed.
Instead of only being limited to register X17, also be able to use the
other scratch register (X16) and the caller saved registers (X9-X15).
Implemented for armeabi-v7 and arm64-v8, if the first instruction of the
function is an unconditional branch, attempt to modify the target of that
branch instead of the original function. Thus the codepath will be:

`App->driver->branch->trampoline->spy->compensation function->driver`
Copy link
Contributor

@AWoloszyn AWoloszyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will give this a test on my devices today.

@pmuetschard pmuetschard merged commit 27e7c96 into google:master Dec 5, 2018
@pmuetschard pmuetschard deleted the plt branch December 5, 2018 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants