In my understanding, ELF header is for program execution view. section is for linker's view.
but linux command 'readelf' shows that there are memory access permission flag for each section (AWX) and each header (RWE).
the book say's more than one of section is merged into single header. what happens if when linker merges more than one section into single header and each section has different access permission flags??
and what is the relationship between access permission in /proc/[pid]/maps such as
root@declspec-desktop:/tmp# cat /proc/1951/maps
004a5000-005f8000 r-xp 00000000 08:01 511 /lib/tls/i686/cmov/libc-2.11.1.so
005f8000-005fa000 r--p 00153000 08:01 511 /lib/tls/i686/cmov/libc-2.11.1.so
005fa000-005fb000 rw-p 00155000 08:01 511 /lib/tls/i686/cmov/libc-2.11.1.so
and access permission in section and header??
how does these permissions (in /proc/[pid]/maps
) determined?