I am using Tornado2.2.1/VxWorks5.5.1 with a target board mounting a
PowerPC processor. My embedded application was formerly developed
under the DIAB toolchain, but I need now to use the GNU toolchain. The
migration from the DIAB toolchain to the GNU toolchain was been with
no problem, except for the use of "#pragma section". In fact, when the
ccppc compiles the following piece of C code:
#pragma section IMG_BUFF1 address=0x1a000000
#pragma use_section IMG_BUFF1 sm_aucImgBuff1
static UCHAR sm_aucImgBuff1 [SIZE_1K][SIZE_1K];
the pragma is ignored.
How can I solve this problem? Which is the way to obtain under GNU the
same result got under DIAB with "#pragma section"?
Thanks in advance.
Marco
For more information, refer to :
http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Variable-Attributes.html
And specify the section address using the link script :
SECTIONS {
...
secname start BLOCK(align) (NOLOAD) : AT ( ldadr )
{ contents } >region =fill
...
}
For more information, refer to :
http://www.math.utah.edu/docs/info/ld_3.html#SEC16
Hope this helps :-)
Best Regards,
Sebastien.