1

When ld-linux (Linux's loader) loads an application, it loads its ELF data structures to memory, builds some structures (e.g., GOT), and passes the execution to the entry point of the loaded application.

Is the loading of this application's code and data done into the loader's address space? Does the execution of the application's code occur in the loader's address space?

If not, what is the mechanism ld-linux uses to pass the execution to the loaded instructions?

Answer (EDIT): The application's code is loaded into the loader's address space. The application code and loader are ran on the same address space.

JC1
  • 519
  • 3
  • 19

1 Answers1

0

http://grahamwideman.wordpress.com/2009/02/09/the-linux-loader-and-how-it-finds-libraries/ http://www.tenouk.com/ModuleW.html basically there are assemblers and linkers too.The hiearchy of ld-linux (loader's linux is very well explained in the second url.

Thanks & Regards,
Alok

linux_fanatic
  • 4,358
  • 3
  • 16
  • 20
  • Sorry, I didn't find these links very useful. I already know the concept of assembler and linker. – JC1 Sep 09 '13 at 13:37
  • If you see the second url it shows that executed code is kept in hard disk and then executed. – linux_fanatic Sep 09 '13 at 17:04
  • http://www.tenouk.com/ModuleW_files/ccompilerlinker001.png This url shows the whole procss that where the executed code is kept in hard disk and then loader executes in the process address space so i think it would help to answer your question. – linux_fanatic Sep 09 '13 at 17:08