I have a number of shared libraries calling each other (.so
, ARM, Android), binary-only.
I want to add logging to some functions, _funcAfuncA()
, ..., funcZ()_
defined in _libsomethinglibsomething.so_so
.
The functions are called from _libstuff1libstuff1.so
, ..., libstuffN.so_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,
_libstuff1libstuff1.so_so
originally referenced only_libsomethinglibsomething.so_so
, and I want it to reference both_libsomethinglibsomething.so_so
and_libOneMoreLiblibOneMoreLib.so_so
. - Or, add an extra function to existing library, e.g. in
_libsomethinglibsomething.so_so
, I rename_funcAfuncA()_
to_funbQfunbQ()_
and define (that is, add)_funcAfuncA()_
to print logs and call_funbQfunbQ()_
.
How can I do any of these?