diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-29 14:37:52 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2017-05-29 14:37:52 +0000 |
commit | 7a64f5a180e8b77b13e8ae8d25fb08d8c58f93af (patch) | |
tree | d845f51be2ba681c4fd357c86585e311fb5b86c1 /gnu/llvm/lib/MC | |
parent | f65891311be27b1121e6103b41d7bc5c7b6947ca (diff) |
openbsd does not use nonexec stack segment header hints.
in fact, false is a much better default for UsesNonexecutableStackSection.
platforms that require it can reenable, instead, saving the rest of us an
unnecessary program header (causes trouble for some special binaries).
ok kettenis
Diffstat (limited to 'gnu/llvm/lib/MC')
-rw-r--r-- | gnu/llvm/lib/MC/MCAsmInfoELF.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gnu/llvm/lib/MC/MCAsmInfoELF.cpp b/gnu/llvm/lib/MC/MCAsmInfoELF.cpp index 2bff6e05966..dcd6cea682d 100644 --- a/gnu/llvm/lib/MC/MCAsmInfoELF.cpp +++ b/gnu/llvm/lib/MC/MCAsmInfoELF.cpp @@ -21,6 +21,8 @@ using namespace llvm; void MCAsmInfoELF::anchor() { } MCSection *MCAsmInfoELF::getNonexecutableStackSection(MCContext &Ctx) const { + if (!UsesNonexecutableStackSection) + return nullptr; return Ctx.getELFSection(".note.GNU-stack", ELF::SHT_PROGBITS, 0); } @@ -29,4 +31,5 @@ MCAsmInfoELF::MCAsmInfoELF() { WeakRefDirective = "\t.weak\t"; PrivateGlobalPrefix = ".L"; PrivateLabelPrefix = ".L"; + UsesNonexecutableStackSection = false; } |