20 lines
620 B
Plaintext
20 lines
620 B
Plaintext
$OpenBSD: patch-lib_MC_MCELFStreamer_cpp,v 1.5 2019/07/07 14:04:07 jca Exp $
|
|
|
|
Index: lib/MC/MCELFStreamer.cpp
|
|
--- lib/MC/MCELFStreamer.cpp.orig
|
|
+++ lib/MC/MCELFStreamer.cpp
|
|
@@ -93,8 +93,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) {
|