This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC Logical Addres Forming
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Doron Bleiberg <doron dot bl at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 10 Feb 2005 17:21:47 +0000
- Subject: Re: GCC Logical Addres Forming
- Organization: Codesourcery LLC
- References: <9046a9430502100835241fcb4@mail.gmail.com>
Doron Bleiberg wrote:
Hi,
I'm studying memory management on linux. All the articles I have read
starts from a given logical address that is later translated into
linear address using the segmentation technique. I have a hard time to
understand how this logical address is formed. How segments are
created by the compiler such that the "magic" of address translation
will work at run time?
Who forms the logical address? How does it formed? When is it being formed?
Can you please direct me to some material on this subject ?
this is not a compiler issue.
'logical addresses' are those that your program sees -- if you use a
debugger on your program, the addresses printed by the debugger are
logical addresses (aka 'virtual addresses').
'physical addresses' are those seen by the memory hardware. If you
stick a logic analyser on the address bus of the system, you'll see
physical addresses.
How logical addresses map to physical addresses is part of the system's
MMU and is outside of the compiler. The linker might have to place
particular pieces of your program in particular ranges of logical
addresses, but again that's a system configuration issue.
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk