HA: [PATCH] D14571: [ELF2] - Implemented PT_GNU_STACK support

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 11:03:55 PST 2015


>I think that's a good suggestion, but that made me think of this: we may want to force users to specify -z execstack if they really want to make the stack executable. To me, controlling the stack executable-ness using .note.GNU-stack section is too subtle and fragile. If you have thousands of object files, and only one file >lacks .note.GNU-stack, the entire program's stack will be executable. It's unlikely to be an intended behavior, and if it is actually intended, I believe it is reasonable to tell so to the linker using the -z flag.
>
>So I guess my point is
>
> - ignore .note.GNU-stack sections at all,
> - make stack non-executable by default,
> - and implement -z execstack
>
>What do you think?

For me sounds good.
I can update the patch to handle -z exectack instead of looking at .note.GNU-stack flags tomorrow.


More information about the llvm-commits mailing list