> As I understand, PT_GNU_STACK uses a single marking to control whether a > task gets an executable stack and whether ASLR is applied to the > executable. you understand wrongly. PT_GNU_STACK just sets the exec permission for the stack (and the heap now mirrors the stack). Nothing more nothing less.