I have Android shared library with armeabi-v7 architecture, and I need to rename some functions inside this.
Firstly, I tried ARM toolchain v4.9 of Android NDK.
I tried:
objcopy --redefine-sym _Z3foo1v=_Z3foo2v libTest.so libTestResult.so
It throws no errors, but it keeps new library identically to old, even CRC hashes are equals.
Next, I also tried all another ARM toolchains of Android NDK: ARM v4.8 toolchain, x86 toolchain, and same problem.
Finally, I downloaded official GNU ARM Embedded Toolchain - https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads - and still have same problem: now CRC is changing, but symbol still have old name.
Why this feature works with "essential" GNU toolchain for Linux, but didn't implemented in ARM toolchain?
How to work-around this?