title: How to get a pointer to a specific executable file's section of a program from within itself? (Maybe with libelf)
body: <p>I'm on a Linux environment and I need to make a program that retrieves some data that is placed in one of the sections of its executable file. So, how to get a pointer to a section of a program (by its name) from within itself?</p>
  
  <p>I know it's possible to use <code>elf_getdata()</code> passing the index of the section as argument to get and <code>Elf_Data</code> struct and one of the fields of this struct is <code>d_buf</code>, which is a pointer to the actual data. However, it seems the <code>elf_getdata()</code> function makes a copy of the section data from the file to the memory and that's not what I want. I want a pointer to the data the has been loaded to the memory in loading time.</p>
  
  <p>So, guys, any idea?</p>