Analyzing memory mapping of a process with pmap. [stack]
I'm trying to understand how stack works in Linux. I read AMD64 ABI sections about stack and process initialization and it is not clear how the stack should be mapped. Here is the relevant quote (3.4.1): Stack State This section describes the machine state that exec (BA_OS) creates for new processes. and It is unspecified whether the data and stack segments are initially mapped with execute permissions or not. Applications which need to execute code on the stack or data segments should take proper precautions, e.g., by calling mprotect() . So I can deduce from the quotes above that the stack