title: BSS section and clearzi
body: <p>I know, that BSS section of a program stores global uninitialized variables. So why would I (inside startup code in branch instruction "<code>clearzi</code>") have to check if this section size equals "<code>0</code>" and then continue? I found this part of a startup code and this is what i need to understand. </p>
  
  <pre><code>    LDR   r0, =__gnu_bssstart
      LDR   r1, =__gnu_bssend
      MOV   r2, #0
  
  clearzi:
      CMP   r0, r1
      BEQ   clearzi_exit
      STR   r2, [r0]
  ADD   r0, r0, #4
      B clearzi
  
  clearzi_exit:
  </code></pre>
  
  <p>This is just a small part of a startup code.</p>