From: Dmitry <di...@ei...> - 2003-02-06 07:35:16
|
Well Oleg, actually my idea of .noinit section was to create a section where variabl= es=20 not being touched at all. So, initially I wasn't thinking about allocate = them=20 in ROM. Anyway, I agree they should (might) be initialized.=20 However, I think that the particular address of the variable (var) can be= =20 found as: =09disp1 =3D &var - __noinit_start; =09var_addr_in_rom =3D disp1 + __noinit_start_rom hm... exactly as yours :) Ok then... in NoinitDefault(v) you should explicitly refer to the variable address -= &v. Ok, I add this function to libc later on tonight. Also, there is a function 'int __init_sections_(int section)' which inits= =20 section at request. > (elf32msp430.sc, elf32msp430_3.sc) > > PROVIDE (__noinit_rom_offset =3D _etext + SIZEOF (.data)-__noinit_star= t ) ; You cannot refer to __noinit_start as this is not defined until the final= =20 linker stage. Use ADDR(.noinit) instead. cheers, ~d /******************************************************************** ("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ `6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys=20 (_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44 _..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia (il),-'' (li),' ((!.-' +7 (812) 3468202, 5585314 ********************************************************************/ |