Virtual Address Space
Gadre Nayan
gadrenayan at gmail.com
Wed Sep 28 09:32:49 EDT 2016
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.
So when your PC increments virtual address for a MMU enabled system, they
will get translated to physical.
On 28 Sep 2016 4:29 p.m., "Prabhunath G" <gprabhunath at gmail.com> wrote:
> 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.
> When you initiate *$./a.out* for execution, the kernel will take your
> start address from the ELF header of *a.out* 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.
>
> Regards,
> Prabhu
>
>
> On Wed, Sep 28, 2016 at 3:41 PM, Madhu K <madhu.sk89 at gmail.com> wrote:
>
>> Hi Arun,
>>
>> Thanks for your response.
>>
>> 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?
>>
>> Thanks
>>
>> On Wed, Sep 28, 2016 at 11:35 AM, Arun Sudhilal <getarunks at gmail.com>
>> wrote:
>>
>>> Hello Madhu,
>>>
>>> On Wed, Sep 28, 2016 at 10:36 AM, Madhu K <madhu.sk89 at gmail.com> wrote:
>>> > Hi All,
>>> >
>>> > This is to understand the Virtual address space.Basically who
>>> generates the
>>> > virtual addresses CPU or GNU compiler?
>>>
>>> I didn't really get your question.
>>>
>>> Linux kernel starts at a fixed location in virtual space. This is
>>> called PAGE_OFFSET. On a kernel split of 3GB/1GB, 32 system, its is
>>> 0xC000_0000. You can have a look at system.map file after compiling
>>> your kernel.
>>> When cpu runs with MMU on, your cpu generates virtual address.
>>>
>>> Regards,
>>> Arun
>>>
>>> >
>>> > Thanks
>>> > Madhu
>>> >
>>> > _______________________________________________
>>> > Kernelnewbies mailing list
>>> > Kernelnewbies at kernelnewbies.org
>>> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>> >
>>>
>>
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>>
>
>
> --
> Regards,
> Prabhunath G
> Linux Trainer
> Bangalore
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20160928/0c8efe88/attachment.html
More information about the Kernelnewbies
mailing list