Code (.text) not execute-only? .rodata is executable?
<p>I am trying to understand how ELF segments are memory mapped. I noticed that various sections are mapped to the same ELF segment. For example, .rodata is mapped to the same segment as .text.</p>

<p>Why is this the case? Why not map .rodata to a separate read-only and not executable segment?</p>

<p>Also, what does it entail to map the .text section to an "execute ONLY" segment (not readable)? Are there any kernel/HW limitations that may hinder this?</p>

<p>EDIT:
I may as well add that I am using the GNU linker, if that makes a difference.</p>