Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbol interposition support for .rodata variables that encode the value into a mov instruction #3

Open
elfmaster opened this issue Dec 16, 2022 · 1 comment
Assignees

Comments

@elfmaster
Copy link
Contributor

We currently support symbol interposition for .rodata if we are patching something like this:

const char my_name[] = "elfmaster";

Because it will compile into two or three instructions that reference the string stored in .rodata by symbol name my_name
Shiva has the ability to relink this code.

In the even that the program we are patching defines a constant 4 byte integer

const int ro_val = 5;

Will often be compiled into a mov w1, #0x5 which we cannot re-link without relocation data. In the future when the Shiva prelinker is able to generate enough relocation data we can handle this type of patch.

See modules/patches/rodata_interposing for an example on patching rodata strings.

@elfmaster elfmaster changed the title Symbol interposition support for .rodata Symbol interposition support for .rodata variables that encode the value into a mov instruction Dec 16, 2022
@elfmaster elfmaster self-assigned this Dec 16, 2022
@elfmaster
Copy link
Contributor Author

This isn't yet an urgent matter, but will eventually need some work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant