Ok Oleg,
Sorry for this mistake again.
I posted a patch to binutils-current which defines some new constants:
__XXX_what_rom (XXX = data|noinit, what = start|end) which point to the ROM
locations. Use them instead. So, this patched linker will appear hopfully in
a week in binutils tree. So, pull it from there and rebuild.
The patch is below.
If you do not want to wait, add the following lines to _all_ (sorry :) linker
scripts and have fun (at the bottom before closing '}'):
PROVIDE (__data_start_rom = _etext) ;
PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
cheers,
~d
Index: scripttempl/elf32msp430.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430.sc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 elf32msp430.sc
*** scripttempl/elf32msp430.sc 30 Dec 2002 19:25:05 -0000 1.1
--- scripttempl/elf32msp430.sc 4 Feb 2003 18:22:56 -0000
*************** SECTIONS
*** 184,188 ****
--- 184,192 ----
.debug_macinfo 0 : { *(.debug_macinfo) }
PROVIDE (__stack = ${STACK}) ;
+ PROVIDE (__data_start_rom = _etext) ;
+ PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
}
EOF
Index: scripttempl/elf32msp430_3.sc
===================================================================
RCS file: /cvs/src/src/ld/scripttempl/elf32msp430_3.sc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 elf32msp430_3.sc
*** scripttempl/elf32msp430_3.sc 30 Dec 2002 19:25:05 -0000 1.1
--- scripttempl/elf32msp430_3.sc 4 Feb 2003 18:22:56 -0000
*************** SECTIONS
*** 153,157 ****
--- 153,161 ----
.debug_macinfo 0 : { *(.debug_macinfo) }
PROVIDE (__stack = ${STACK}) ;
+ PROVIDE (__data_start_rom = _etext) ;
+ PROVIDE (__data_end_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_start_rom = _etext + SIZEOF (.data)) ;
+ PROVIDE (__noinit_end_rom = _etext + SIZEOF (.data) + SIZEOF (.noinit)) ;
}
EOF
On Tuesday 04 February 2003 20:25, Oleg Skydan wrote:
> Hi, All !
>
> I have a problem with .noinit section.
>
> I have declared some variables in the next form:
>
> int __attribute__((section(".noinit, \"wa\", @progbits;"))) var=13;
>
> Dmitry wrote that _noinit_start should point to the flash
> with the initializer values, but it points to the RAM in
> my case. Any suggeston ?
>
> All the best,
> Oleg.
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users
--
/********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314
********************************************************************/