Well Oleg,

actually my idea of .noinit section was to create a section where variables 
not being touched at all. So, initially I wasn't thinking about allocate them 
in ROM.

Anyway, I agree they should (might) be initialized. 

However, I think that the particular address of the variable (var) can be 
found as:
        disp1 = &var - __noinit_start;
        var_addr_in_rom = 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 
section at request.

> (elf32msp430.sc, elf32msp430_3.sc)
>
>  PROVIDE (__noinit_rom_offset = _etext + SIZEOF (.data)-__noinit_start ) ;

You cannot refer to __noinit_start as this is not defined until the final 
linker stage. Use ADDR(.noinit) instead.

cheers,
~d


/********************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild      UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise Information Sys 
      (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky prospekt,   20 / 44
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,   Russia
   (il),-''  (li),'  ((!.-'             +7 (812)  3468202, 5585314
 ********************************************************************/


Reply via email to