Re: Virtual Address Space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
 
I compile main.s and it generates main.o. With objdump I can see:
 
0000000000000000 <_start>:
   0: b8 01 00 00 00        mov    $0x1,%eax
   5: bb 00 00 00 00        mov    $0x0,%ebx
   a: cd 80                         int    $0x80
 
After link main.o it generates main. With objdump I now can see:
 
0000000000400078 <_start>:
  400078: b8 01 00 00 00        mov    $0x1,%eax
  40007d: bb 00 00 00 00        mov    $0x0,%ebx
  400082: cd 80                         int    $0x80
 
So, linker generates virtual address, doesn't it? But why it starts at 400078 and not in other any location? Is there any logic here? A virtual address can start at 0?
 
Regards.

El 29.09.2016 09:25, arshad hussain escribió:


On 28-Sep-2016, at 10:36 am, Madhu K <madhu.sk89@xxxxxxxxx> wrote:

Hi All,

The support comes right through from the architecture.

Linear address: Also virtual address. This is Address CPU can address. This is 0 - 4GB under 32bit architecture.
Physical address: This are actual memory installed in your system. Linear address have to be converted to
physical address eventually. MMU translate linear address with the help of paging to physical address.



This is to understand the Virtual address space.Basically who generates the virtual addresses CPU or GNU compiler?

A program image generated by compiler & linker uses Virtual Address . During execution of the program CPU + MMU
translates or maps each virtual address to physical address.

Net-net this is architecture dependent and would highly recommend reading Intel's Architecture Manual for your reference.


Thanks
Madhu
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux