In the context of an operating system, if memory is allocated at runtime when a program executes, what exactly is the role of the linker? I see that the linker combines all object files into one executable file, but how does it know if a variable is defined in another source file? And how does it identify when memory allocation occurs at runtime because linker process occur before run time?