title: How do I leave memory uninitialized in GNU ARM assembly?
body: <p>I'm using GCC on my Raspberry Pi to compile some assembly code for a course I'm taking. It is my understanding from information in the <a href="https://sourceware.org/binutils/docs/as/" rel="nofollow noreferrer">GNU Assembler Reference</a> that I can reproduce the following C code in GNU ARM Assembly:</p>
  
  <pre><code>int num = 0;
  </code></pre>
  
  <p>By writing this:</p>
  
  <pre><code>        .data
  num:    .word 0
  </code></pre>
  
  <p>Great! Now how would I write this?</p>
  
  <pre><code>int num;
  </code></pre>
  
  <p>It is my understanding that leaving a variable uninitialized like this means I should treat it as containing whatever garbage value was in the memory location before. Therefore, I shouldn't use it before I've given it a value in some way.</p>
  
  <p>But suppose for some reason I intended to store a huge amount of data in memory and needed to reserve a massive amount of space for it. It seems to me like it would be a massive waste of resources to initialize the entire area of memory to some value if I'm about to fill it with some data anyways. Yet from what I can find there seems to be no way to make a label in GCC ARM Assembly without initializing it to some value. According to my <a href="https://books.google.com/books?id=gks1CgAAQBAJ&amp;pg=PA42" rel="nofollow noreferrer">assembly textbook</a> the <code>.word</code> directive can have zero expressions after it, but if used this way "then the address counter is not advanced and no bytes are reserved." My first though was to use the ".space" or ".skip" directives instead, but for this directive even the <a href="https://sourceware.org/binutils/docs/as/Space.html#Space" rel="nofollow noreferrer">official documentation</a> says that "if the comma and fill are omitted, fill is assumed to be zero."</p>
  
  <p>Is there no way for me to reserve a chunk of memory without initializing it in GCC ARM Assembly?</p>