embarc_osp icon indicating copy to clipboard operation
embarc_osp copied to clipboard

arch: arc: fix size of sections

Open xxkent opened this issue 1 year ago • 0 comments

Startup code may have exceeded the sections sizes while clear/copy them and erase data beyond its boundaries. -------------------------8-------------------------- _s3_clear_bss: mov r0, _f_bss mov r1, _e_bss cmp r0, r1 jge _arc_reset_call_main mov r2, 0 _s3_clear_bss_loop: st.ab r2, [r0, 4] cmp r0, r1 jlt _s3_clear_bss_loop -------------------------8------------------------- Since we use 4 byte load/store instructions while working with sections let's align section boundaries to the same 4 bytes.

xxkent avatar Sep 27 '23 21:09 xxkent