hi<div>this may help</div><div><a href="http://www.akae.cn/study/ebook/computerscience/Linkers%20and%20Loaders.pdf">http://www.akae.cn/study/ebook/computerscience/Linkers%20and%20Loaders.pdf</a><br><br><div class="gmail_quote">
On Fri, May 27, 2011 at 2:56 AM, Rajat Sharma <span dir="ltr"><<a href="mailto:fs.rajat@gmail.com">fs.rajat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Sandeep,<br>
<br>
probably you want to look at how your program is loaded in memory. For<br>
example an ELF binary is understood by ELF format handler inside<br>
kernel. Format handler supply their load_binary methods to load a<br>
program image im memory and initial its different virtual memory areas<br>
(stack, heap etc.). exec system call searches for correct format<br>
handler for you based on file header.<br>
<br>
Please go thoroghly through Understanding the Linux Kernel, 3rd<br>
Edition, Chapter 20. Program ExZecution.<br>
<br>
-Rajat<br>
<div><div></div><div class="h5"><br>
On Fri, May 27, 2011 at 12:14 PM, sandeep kumar<br>
<<a href="mailto:coolsandyforyou@gmail.com">coolsandyforyou@gmail.com</a>> wrote:<br>
> hi all,<br>
> I am new to the linux kernel internals. I know there is a memory management<br>
> subsystem which handles all the memory related things.<br>
><br>
> But Now i want to know a bit deeper how things work.<br>
><br>
> I want to start with the following question,<br>
> How a program could generate the memory addresses for its variables, when it<br>
> is about to run?<br>
><br>
> Can please somebody give pointers how to learn this kind of things like,<br>
> "in the early stages (when our program is about to be executed..about to<br>
> become a process) what are the things that will be done by the kernel?"<br>
><br>
> Please help me in this regard,<br>
><br>
> Thanking you,<br>
> Sandeep Kumar A.<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> Kernelnewbies mailing list<br>
> <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><br>
><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br></div>