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.
We currently support symbol interposition for
.rodata
if we are patching something like this: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
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.