I have a number of shared libraries calling each other (.so
, ARM, Android), binary-only.
I want to add logging to some functions, funcA()
, ..., funcZ()
defined in libsomething.so
.
The functions are called from libstuff1.so
, ..., libstuffN.so
.
I can rename a function in the original library (keeping the name in the same bucket is a bit tricky, but possible).
I want to either:
- Add an extra library to the dependency list of the calling library, that is,
libstuff1.so
originally referenced onlylibsomething.so
, and I want it to reference bothlibsomething.so
andlibOneMoreLib.so
. - Or, add an extra function to existing library, e.g. in
libsomething.so
, I renamefuncA()
tofunbQ()
and define (that is, add)funcA()
to print logs and callfunbQ()
.
How can I do any of these?