title: ARM assembly program emulated in qemu throws segfault when trying to write to a valid memory address
body: <p>I have a small ARM assembly program I'm trying to emulate:</p>
  <pre><code>.equ _STACK_SIZE,  64
  
  .align 4
  _stack_start:
      .fill _STACK_SIZE, 1, 0
  _stack_end:
  
  .text
  .global _start
  _start:
      ldr     r0, =0x101
      ldr     r1, =0x102
      ldr     r0, =_stack_start
      str     r1, [r0]
      push    {r0,r1}
  </code></pre>
  <p>This program is throwing a seg. fault when it reaches the <code>str</code> line. As far as I understand, that instruction is writing to a valid memory area, which has been allocated with <code>.fill</code>. In addition, the disasembly shows the following:</p>
  <pre><code>
  empty:     file format elf32-littlearm
  
  
  Disassembly of section .text:
  
  00008000 &lt;_stack_start&gt;:
      ...
  
  00008040 &lt;_start&gt;:
      8040:   e59f0034    ldr r0, [pc, #52]   ; 807c &lt;_start+0x3c&gt;
      8044:   e59f1034    ldr r1, [pc, #52]   ; 8080 &lt;_start+0x40&gt;
      8048:   e59f0034    ldr r0, [pc, #52]   ; 8084 &lt;_start+0x44&gt;
      804c:   e5801000    str r1, [r0]
  
  [...]
  </code></pre>
  <p>so <code>_stack_start</code> is actually there. <strong>Why is that memory region not valid?</strong></p>