When someone statically links a .lib, will the linker copy the whole contents of lib into the final executable or just the functions used in the object files?
It certainly doesn't throw in the whole library.
But it doesn't necessarily include just "the functions used in the object files" either.
The linker will make a recursively built list of which object modules in the library satisfy your undefined symbols.
Then, it will include each of those object modules.
Typically, a given object module will include more than one function, and if some of these are not called by the ones that you do call, you will get some number of functions (and data objects) that you didn't need.