.text section address range of position independent executable
<p>I want the address of the .text section of a position independent executable. Using <code>readelf -S</code>:</p>

<pre><code>Name              Type             Address           Offset
       Size              EntSize          Flags  Link  Info  Align
.text             PROGBITS         0000000000002700  00002700
       0000000000001672  0000000000000000  AX       0     0     16
</code></pre>

<p>I learn that it will begin 0x2700 bytes past where library was loaded into memory. But how can I get the load address of the executable?
Is there any other way to get the .text section address range during runtime (from the running program)?</p>