Correct.When I link a static library to my code, the object code of that static file is added or copied to my object file. It doesn't matter if the static library is later deleted from my disk. But when I link a shared library, then only a list containing the functions, provided by the shared library, is added to my object file. If I were to delete the shared library, I'd get an error while trying to run the object file.
Yeap, -S tells GCC to stop before the assembling phase, and -c tells it to stop after assembling (no linking).Also, if I don't add the -S switch to gcc, it still does generate the assembly code as an intermediate step, doesn't it? It just doesn't write out the file.