Reputation: 4852
What is the role of a loader when it loads a process on a linux machine. Does it only create the virtual address space or does it do some other things as well, like setting up stack pointers, initializing BSS segment to zeroes, etc. Or does the C runtime library has something to do with it?
Upvotes: 2
Views: 269
Reputation: 9224
It does not create the address space; that's the kernel's job. The kernel also sets up a stack. The loader loads the program and libraries into the address space, including mapping zeroes into BSS segments, etc. Most Linux systems/programs use the loader that comes with the GNU C library, glibc.
Upvotes: 1