diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-03-23 14:43:51 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-03-23 14:43:51 +0000 |
| commit | 16f11462cee847a690537408fae6329870dd09a4 (patch) | |
| tree | 0aa5ae1b10613a46dbb2a6546a1da149c3407cb2 | |
| parent | 8619962c733e1ce5c4becc4b8bf6bd4a62b46f78 (diff) | |
| download | bcm5719-llvm-16f11462cee847a690537408fae6329870dd09a4.tar.gz bcm5719-llvm-16f11462cee847a690537408fae6329870dd09a4.zip | |
[ELF] - Simplify. NFC.
llvm-svn: 328319
| -rw-r--r-- | lld/ELF/Writer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 99ce1c7ce79..ffa29209e33 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1757,11 +1757,9 @@ template <class ELFT> std::vector<PhdrEntry *> Writer<ELFT>::createPhdrs() { // pages for the stack non-executable. If you really want an executable // stack, you can pass -z execstack, but that's not recommended for // security reasons. - unsigned Perm; + unsigned Perm = PF_R | PF_W; if (Config->ZExecstack) - Perm = PF_R | PF_W | PF_X; - else - Perm = PF_R | PF_W; + Perm |= PF_X; AddHdr(PT_GNU_STACK, Perm)->p_memsz = Config->ZStackSize; // PT_OPENBSD_WXNEEDED is a OpenBSD-specific header to mark the executable |

