This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: a question about linker and addresses


Thank you for the reply. Does PROM loader uses LMA address to load the
data section?
When we specify LMA and VMA, will any extra coded be added to our
program? to transfer the LMA data section to VMA address?


On 11/2/10, Ian Lance Taylor <iant@google.com> wrote:
> ali hagigat <hagigatali@gmail.com> writes:
>
>> How data section is loaded into ROM, while the program has not been
>> started up? (Usually at first we start a program, then sections are
>> loaded into the memory, isn't it?)
>
> It is true that on an ordinary Unix or Windows system, the program is
> loaded into memory when it is started.  However, an embedded system may
> use ROM, and that ROM may contain a program.  Exactly how the program is
> loaded into the ROM is not very relevant; a typical approach would be to
> use a PROM burner.  What you have then is a system which is running a
> program when it is powered up, and that program is loaded into ROM.
> Since ROM is by definition read-only, it is desirable to have a way to
> initialize the read-write data.  Using a different VMA and LMA for the
> data sections is one way to do that.
>
> Ian
>


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