This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: VMA and LMA question


rakesh <mljangir@yahoo.co.in> writes:

> [Excuse me if this mail is irrelevent to these lists]
> 
> I have some question about VMA and LMA. I have read
> manual pages of ld and linker script and found that
> these address signifies load and run address of an
> image. For an embedded system where there is no loader
> these seems to be ok as there is no one to decide
> where the image should be loaded and where to run
> image from. But for an OS like linux this should be
> decided by loader. Still I see VMA and LMA section
> filled in a.out. If loader is going to decide load and
> run address of image then what is significance of
> these address and what about memory management unit
> which does lot of paging and other stuff? I am very
> confused about this. Can somebody explain this in
> detail.

Actually VMA and LMA are more relevant to embedded applications that
to Linux. They have nothing to do with paging or memory management. In
Linux either the program is position independent, in which case the
addresses are irrelevant, or the program is linked to load and run at
a fixed address, in which case they will be the same.

In an embedded system the program is usually stored in ROM. However
the initialized data section must be copied out of ROM into RAM. In
this case the data section's LMA will be an address in the ROM where
it is placed during linking, but its VMA will be the address to which
it gets copied in RAM.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]