<p dir="ltr">Virtual addresses will be used only in case MMU is enabled, otherwise for a processor an address is something it can put on the bus, irrespective of physical or virtual.</p>
<p dir="ltr">So when your PC increments virtual address for a MMU enabled system, they will get translated to physical.</p>
<div class="gmail_quote">On 28 Sep 2016 4:29 p.m., &quot;Prabhunath G&quot; &lt;<a href="mailto:gprabhunath@gmail.com">gprabhunath@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The virtual addresses what you see in the output of objdump is given/associated by Linker to every instruction and data symbol in the data/bss section except for symbols in the stack section. It is wrong to use generated in the context of Linker. <div>When you initiate <b>$./a.out</b> for execution, the kernel will take your start address from the ELF header of <b>a.out</b> and place it on the PC (program counter) or IP (instruction pointer) of the CPU, thereafter CPU will start incrementing or generating virtual address for every subsequent instructions. </div><div><br></div><div>Regards,<br>Prabhu</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 3:41 PM, Madhu K <span dir="ltr">&lt;<a href="mailto:madhu.sk89@gmail.com" target="_blank">madhu.sk89@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Hi Arun,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks for your response.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">I will elaborate my question.Assume I have test.c file, I compiled test.c and generated the a.out ( Executable for linux ), when I do objdump of a.out, we can see addresses( virtual address ) associated with each instruction, these instructions are generated by whom?</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Thanks</div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 28, 2016 at 11:35 AM, Arun Sudhilal <span dir="ltr">&lt;<a href="mailto:getarunks@gmail.com" target="_blank">getarunks@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Madhu,<br>
<span><br>
On Wed, Sep 28, 2016 at 10:36 AM, Madhu K &lt;<a href="mailto:madhu.sk89@gmail.com" target="_blank">madhu.sk89@gmail.com</a>&gt; wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; This is to understand the Virtual address space.Basically who generates the<br>
&gt; virtual addresses CPU or GNU compiler?<br>
<br>
</span>I didn&#39;t really get your question.<br>
<br>
Linux kernel starts at a fixed location in virtual space. This is<br>
called PAGE_OFFSET. On a kernel split of 3GB/1GB, 32 system, its is<br>
0xC000_0000. You can have a look at system.map file after compiling<br>
your kernel.<br>
When cpu runs with MMU on, your cpu generates virtual address.<br>
<br>
Regards,<br>
Arun<br>
<br>
&gt;<br>
&gt; Thanks<br>
&gt; Madhu<br>
&gt;<br>
&gt; ______________________________<wbr>_________________<br>
&gt; Kernelnewbies mailing list<br>
&gt; <a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.or<wbr>g</a><br>
&gt; <a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.or<wbr>g/mailman/listinfo/kernelnewbi<wbr>es</a><br>
&gt;<br>
</blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org" target="_blank">Kernelnewbies@kernelnewbies.or<wbr>g</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.or<wbr>g/mailman/listinfo/kernelnewbi<wbr>es</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">Regards,<br>Prabhunath G<br>Linux Trainer<br>Bangalore<br></div>
</div></div></div>
<br>______________________________<wbr>_________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.<wbr>org</a><br>
<a href="https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">https://lists.kernelnewbies.<wbr>org/mailman/listinfo/<wbr>kernelnewbies</a><br>
<br></blockquote></div>