I have gone through SO question1 and SO question2 but they are far more descriptive for my simple problem and here it is:
I have an application which is dynamically linked to a shared object(.dll, .so or whatever!). I am aware that the tool chain leaves a stub in our application which will be filled by dynamic linker. Fare enough !!
What I didn't get:
1) What will a stub look like( I know it's an odd way to put it)? I can
guess that it is an entry point to our application but is it what we call a
backdoor?
2) Suppose the that we looking for the object code for a function printf()
but
the dynamic library that we are linking to, say mylib.dll
contains object
code for printf()
but not restricted to that. When the linking happens are
linkers smart enough to copy the object code for printf()
alone or will
it copy the entire dynamic library to the application?
Or am I totally confused?