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]

 





Ian Lance Taylor-3 wrote:
> 
> "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
> 
> 

Thanks a lot Ian. I could clearly understand the need of having two .data
sections in RAM which facilitates warm reboot. :)

Jeffi

-- 
View this message in context: http://old.nabble.com/How-to-dynamically-compute-space-for-LMA-of-.data-section-in-ld-script--tp27026793p27122740.html
Sent from the gcc - Help mailing list archive at Nabble.com.


[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