title: How to find the function memory map in ARM ELF file?
body: <p>I am trying to perform loop bound analysis for ARMV7m code using Z3 for a big Framework.
  I would like to find the memory address that are used by a certain function inside .elf file
  for example in a function foo() I have the below basic block</p>
  <pre><code>ldr     r1, [r3, #0x20]
  strb    r2, [r3, #6]  {__elf_header}
  str     r2, [r3, #0x24]  {__elf_header}
  str     r2, [r3, #0x20]  {__elf_header}
  mov     r3, r1
  cmp     r1, #0
  bne     #0x89f6
  </code></pre>
  <p>How can I get the initial memory location used by this function <code>[r3, #0x20] </code>? Are there memory segements for every function to access or is it random ?
  Given that the above basic block is a loop. Is there a way to know the memory address that will be used during its execution ?</p>
  <p>Does the compiler for example save a memory location address from 0x20 to 0x1234 to be only accessed during the execution of such basic block ? In another word, Is there a map between a function and the range of memory address used by it ?</p>