projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8619962
)
[ELF] - Simplify. NFC.
author
George Rimar
<grimar@accesssoftek.com>
Fri, 23 Mar 2018 14:43:51 +0000
(14:43 +0000)
committer
George Rimar
<grimar@accesssoftek.com>
Fri, 23 Mar 2018 14:43:51 +0000
(14:43 +0000)
llvm-svn: 328319
lld/ELF/Writer.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/Writer.cpp
b/lld/ELF/Writer.cpp
index 99ce1c7ce79606264ad5769eb0e3eed6c521f9af..ffa29209e33ab37e0949be6ba58410b82d7ae6c4 100644
(file)
--- 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