artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f186a3
)
if we return nullptr for a "noexec" section, then don't change section.
author
espie
<espie@openbsd.org>
Wed, 28 Jun 2017 07:37:38 +0000
(07:37 +0000)
committer
espie
<espie@openbsd.org>
Wed, 28 Jun 2017 07:37:38 +0000
(07:37 +0000)
prevents core dumps :)
okay tedu@
gnu/llvm/lib/MC/MCELFStreamer.cpp
patch
|
blob
|
history
diff --git
a/gnu/llvm/lib/MC/MCELFStreamer.cpp
b/gnu/llvm/lib/MC/MCELFStreamer.cpp
index
0ef1b2a
..
fd0e345
100644
(file)
--- a/
gnu/llvm/lib/MC/MCELFStreamer.cpp
+++ b/
gnu/llvm/lib/MC/MCELFStreamer.cpp
@@
-91,8
+91,11
@@
void MCELFStreamer::InitSections(bool NoExecStack) {
SwitchSection(Ctx.getObjectFileInfo()->getTextSection());
EmitCodeAlignment(4);
- if (NoExecStack)
- SwitchSection(Ctx.getAsmInfo()->getNonexecutableStackSection(Ctx));
+ if (NoExecStack) {
+ MCSection *s = Ctx.getAsmInfo()->getNonexecutableStackSection(Ctx);
+ if (s)
+ SwitchSection(s);
+ }
}
void MCELFStreamer::EmitLabel(MCSymbol *S) {