ruiu added a comment.

GNU linkers assume that input object files that work with non-executable stack 
has a .note.GNU-stack section, and they emit a PT_GNU_STACK segment to mark the 
stack area non-executable if all input files have that marker section.

If restoring default means we implement that behavior, then lld shouldn't do 
that. That mechanism is error-prone, and the consequence of an error is 
disabling a major security measure. To be on the safe side, we simply emit 
unless it is explicitly to not do that by `-z execstack`.

If you add `-z nognustack` as an alias to `-z execstack` (and changing the 
behavior of `-z execstack` to not add the marker segment at all), I think I'm 
fine with that.


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56554/new/

https://reviews.llvm.org/D56554



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to