openbsd-ports/devel/llvm/patches/patch-lib_MC_MCELFStreamer_cpp
ajacoutot ab90bf3743 Update to llvm-6.0.0.
tested in a bulk
from Brad (maintainer)
2018-04-07 14:55:42 +00:00

20 lines
627 B
Plaintext

$OpenBSD: patch-lib_MC_MCELFStreamer_cpp,v 1.3 2018/04/07 14:55:42 ajacoutot Exp $
Index: lib/MC/MCELFStreamer.cpp
--- lib/MC/MCELFStreamer.cpp.orig
+++ lib/MC/MCELFStreamer.cpp
@@ -96,8 +96,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, SMLoc Loc) {