title: Where are the symbols etext, edata and end defined?
body: <p>This is a code from Linux man page:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  extern char etext, edata, end;
  
  int main() {
      printf("First address past:\n");
      printf("    program text (etext)      %10p\n", &amp;etext);
      printf("    initialized data (edata)  %10p\n", &amp;edata);
      printf("    uninitialized data (end)  %10p\n", &amp;end);
  
      exit(EXIT_SUCCESS);
  }
  </code></pre>
  
  <p>when run, the program below produces output such as the following:</p>
  
  <pre><code>$ ./a.out
  First address past:
      program text (etext)       0x8048568
      initialized data (edata)   0x804a01c
      uninitialized data (end)   0x804a024
  </code></pre>
  
  <p>Where are <code>etext</code>, <code>edata</code> <code>end</code> defined ? How those symbols are assigned values ? Is it by linker or something else ? </p>