So this is the scenario I'm looking at:
I have 3 libraries - A, B and C.
- Library A implements the
foo() function and provides it as an API. - The
foo() function calls the POSIX write() call to write some data. - Library B writes the shell to the
write() call of glibc using the linker -wrap option. - Library C refers to A and B.
Any call to write() that the C make library will be intercepted by the B library shell. But, my question is, if the C library calls foo() , the write() call inside foo () will be intercepted by B?
source share