Re: How to dynamically compute space for LMA of .data section in ld script?

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

 



"Jeffi Edward.J" <j.jeffi@xxxxxxxxxxx> writes:

> Since I'm porting the existing script (from diab) written for my application
> to GNU ld, I have to follow the semantics used in the existing script. Does
> it really make sense to have two .data sections within RAM itself? Since I'm
> very new to embedded domain, I'm not able to imagine indepth for the
> necessity of two .data sections in RAM. Will it cause any problem if I have
> only .data section (next to .text section, and LMA=VMA for .data)? How does
> having two .data sections add value to memory protection?

Having two adjacent .data sections does not help with memory
protection as far as I can see.

Other than a ROM/RAM distinction, one reason to use two .data sections
is to permit the embedded system to do a hot reboot.  You can restart
the program by copying the .data from LMA to VMA and jumping to the
start address.  This assumes that there has been no memory corruption,
of course.

Ian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux