Function r0::init_data [] [src]

pub unsafe fn init_data<T>(sdata: *mut T, edata: *mut T, sidata: *const T) where
    T: Copy

Initializes the .data section


  • sdata. Pointer to the start of the .data section.
  • edata. Pointer to the open/non-inclusive end of the .data section. (The value behind this pointer will not be modified)
  • sidata. .data section Load Memory Address (LMA)
  • Use T to indicate the alignment of the .data section and its LMA.


  • Must be called exactly once
  • mem::size_of::<T>() must be non-zero
  • edata >= sdata
  • The sdata -> edata region must not overlap with the sidata -> ... region
  • sdata, edata and sidata must be T aligned.