copy of . data section

Aaron J. Grier aaron at
Fri Sep 5 22:17:36 UTC 2008

On Fri, Sep 05, 2008 at 05:44:07AM +0000, Bassem Fahmy wrote:
> I'm currently doing a bsp for atmel sam7 i'm producing a .ELF. how can
> i copy the .data section from the flash to the data.

the linker script only tells the linker where to place things in the ELF
file, and where (in flash or RAM) variables and functions are located.
your BSP is still responsible for copying .data from read-only to
read-write memory during startup.  I believe it's also common for .bss
to be cleared there too.

  Aaron J. Grier  |   Frye Electronics, Tigard, OR   |  aaron at

More information about the users mailing list