Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
- Leo Havmøller
October 7, 2011, 3:58 am

Hi,
I have an ld script for a statically linked application. The section for
initialized data is specified as:
.data : { __DATA_START = .; (.data) __DATA_END = .; } > ram AT > flash
Which creates the .data section itself, as well as a const section of the
same size.
Is there some way to name the const part, so I can deside where its placed?
Leo Havmøller.
I have an ld script for a statically linked application. The section for
initialized data is specified as:
.data : { __DATA_START = .; (.data) __DATA_END = .; } > ram AT > flash
Which creates the .data section itself, as well as a const section of the
same size.
Is there some way to name the const part, so I can deside where its placed?
Leo Havmøller.

Re: ld script: named section for const part of .data?

The placement at run-time is determined by > ram, and
the placement of the constant copy is determined by AT > flash.
You can create a new memory section and point to it instead
of ram or flash, depending on which you like to place elsewhere.
The constants by GCC are usually in named sections .rodata*.
--
Tauno Voipio
Tauno Voipio
Site Timeline
- » Monolithic DC/DC converters
- — Next thread in » Embedded Programming
-
- » The Rabbits
- — Previous thread in » Embedded Programming
-
- » Using C preproc to uniquely identify structure members
- — Newest thread in » Embedded Programming
-
- » Подвох
- — The site's Newest Thread. Posted in » Electronic Circuits (Russian)
-