[PATCH] D14571: [ELF2] - Implemented PT_GNU_STACK support, -z execstack option.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 12:29:26 PST 2015
> What do you mean by legacy? An old loader will just ignore this
> program header, no?
Sorry, just read that that was not the case.
OK, I think we are all in agreement on the objective: non executable
stacks by default.
The problem them is that how to do it is dependent on the dynamic
linker, and we don't have a reliable way saying which dynamic linker
will be used.
How about
* -z execstack: add the program header marking the stack exectuable.
* -z noexecstack: add the program header marking the stack non exectuable.
* If neither, mark the stack non executable if we ever see
.note.GNU-stack. I.E., use it as an indication that the dynamic linker
uses that segment.
Cheers,
Rafael
More information about the llvm-commits
mailing list