title: Write specific value at specific address in ROM when programming in C
body: <p>I currently have a C project where I have to write a specific value (0xaa) to a specific address (0x3fec0), and I would like to write it during the programming sequence. The solution I have found is the following :</p>
  
  <p>I write another section in the linker file :</p>
  
  <pre><code>/* Custom flag section in linker file */
  _flag_start = 0x3fec0;
  .flag _flag_start :
  {
      KEEP(*(.flag));
  }
  </code></pre>
  
  <p>I write the value as a static variable : </p>
  
  <pre><code>static uint8_t flag __attribute__((section (".flag"))) __attribute__((__used__)) = 0xaa;
  </code></pre>
  
  <p>It works well, and I manage to write the right value at the right address. However it also generates a very heavy binary : because I set this section at 0x3fec0, my binary will be 261824 Bytes (0x3fec0 in decimal), meaning approx 255KB, as if it was filling with empty data until it reaches this address.</p>
  
  <p>My question is : how to perform the same thing, but without impacting the size of the binary file ?</p>