blob: 84eab9d5a90111296950cc781ff2a5e8a630bd43 [file] [log] [blame]
Matt Fleming3565a062010-08-16 18:57:57 +00001//===- lib/MC/MCELFStreamer.cpp - ELF Object Output ------------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file assembles .s files and emits ELF .o object files.
11//
12//===----------------------------------------------------------------------===//
13
Jan Sjödin24b17c62011-03-03 14:52:12 +000014#include "MCELFStreamer.h"
Jan Sjödin2ddfd952011-02-28 21:45:04 +000015#include "MCELF.h"
Jan Sjödin24b17c62011-03-03 14:52:12 +000016#include "llvm/MC/MCStreamer.h"
Matt Fleming3565a062010-08-16 18:57:57 +000017#include "llvm/MC/MCCodeEmitter.h"
18#include "llvm/MC/MCELFSymbolFlags.h"
19#include "llvm/MC/MCExpr.h"
20#include "llvm/MC/MCInst.h"
Matt Fleming3565a062010-08-16 18:57:57 +000021#include "llvm/MC/MCSection.h"
Matt Fleming3565a062010-08-16 18:57:57 +000022#include "llvm/MC/MCSymbol.h"
Rafael Espindola484291c2010-11-01 14:28:48 +000023#include "llvm/MC/MCValue.h"
Evan Cheng78c10ee2011-07-25 23:24:55 +000024#include "llvm/MC/MCAsmBackend.h"
Matt Fleming3565a062010-08-16 18:57:57 +000025#include "llvm/Support/Debug.h"
26#include "llvm/Support/ELF.h"
27#include "llvm/Support/ErrorHandling.h"
28#include "llvm/Support/raw_ostream.h"
Matt Fleming3565a062010-08-16 18:57:57 +000029
30using namespace llvm;
31
Rafael Espindolad80781b2010-09-15 21:48:40 +000032void MCELFStreamer::InitSections() {
33 // This emulates the same behavior of GNU as. This makes it easier
34 // to compare the output as the major sections are in the same order.
35 SetSectionText();
36 SetSectionData();
37 SetSectionBss();
38 SetSectionText();
39}
40
Matt Fleming3565a062010-08-16 18:57:57 +000041void MCELFStreamer::EmitLabel(MCSymbol *Symbol) {
Rafael Espindolaba210242010-11-28 16:22:59 +000042 assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
43
Rafael Espindolaea4afa92010-11-28 17:18:55 +000044 MCObjectStreamer::EmitLabel(Symbol);
Rafael Espindola73ffea42010-09-25 05:42:19 +000045
Rafael Espindolae1a25872010-11-11 19:04:55 +000046 const MCSectionELF &Section =
47 static_cast<const MCSectionELF&>(Symbol->getSection());
Rafael Espindolaea4afa92010-11-28 17:18:55 +000048 MCSymbolData &SD = getAssembler().getSymbolData(*Symbol);
Rafael Espindola1c130262011-01-23 04:43:11 +000049 if (Section.getFlags() & ELF::SHF_TLS)
Jan Sjödin2ddfd952011-02-28 21:45:04 +000050 MCELF::SetType(SD, ELF::STT_TLS);
Matt Fleming3565a062010-08-16 18:57:57 +000051}
52
53void MCELFStreamer::EmitAssemblerFlag(MCAssemblerFlag Flag) {
54 switch (Flag) {
Jim Grosbachce792992010-11-05 22:08:08 +000055 case MCAF_SyntaxUnified: return; // no-op here.
56 case MCAF_Code16: return; // no-op here.
Jim Grosbachba219572010-11-05 22:40:09 +000057 case MCAF_Code32: return; // no-op here.
Matt Fleming3565a062010-08-16 18:57:57 +000058 case MCAF_SubsectionsViaSymbols:
59 getAssembler().setSubsectionsViaSymbols(true);
60 return;
61 }
62
63 assert(0 && "invalid assembler flag!");
64}
65
Jim Grosbachce792992010-11-05 22:08:08 +000066void MCELFStreamer::EmitThumbFunc(MCSymbol *Func) {
67 // FIXME: Anything needed here to flag the function as thumb?
Rafael Espindola64695402011-05-16 16:17:21 +000068
69 getAssembler().setIsThumbFunc(Func);
70
71 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Func);
72 SD.setFlags(SD.getFlags() | ELF_Other_ThumbFunc);
Jim Grosbachce792992010-11-05 22:08:08 +000073}
74
Matt Fleming3565a062010-08-16 18:57:57 +000075void MCELFStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
76 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into
77 // MCObjectStreamer.
78 // FIXME: Lift context changes into super class.
79 getAssembler().getOrCreateSymbolData(*Symbol);
80 Symbol->setVariableValue(AddValueSymbols(Value));
81}
82
Rafael Espindola7768a9d2011-02-16 01:08:29 +000083void MCELFStreamer::ChangeSection(const MCSection *Section) {
Rafael Espindola1f4f9e32010-11-14 04:17:37 +000084 const MCSymbol *Grp = static_cast<const MCSectionELF *>(Section)->getGroup();
85 if (Grp)
86 getAssembler().getOrCreateSymbolData(*Grp);
Rafael Espindola7768a9d2011-02-16 01:08:29 +000087 this->MCObjectStreamer::ChangeSection(Section);
Rafael Espindola1f4f9e32010-11-14 04:17:37 +000088}
89
Rafael Espindola484291c2010-11-01 14:28:48 +000090void MCELFStreamer::EmitWeakReference(MCSymbol *Alias, const MCSymbol *Symbol) {
91 getAssembler().getOrCreateSymbolData(*Symbol);
92 MCSymbolData &AliasSD = getAssembler().getOrCreateSymbolData(*Alias);
93 AliasSD.setFlags(AliasSD.getFlags() | ELF_Other_Weakref);
Rafael Espindola94ed5fc2010-11-15 16:33:49 +000094 const MCExpr *Value = MCSymbolRefExpr::Create(Symbol, getContext());
Rafael Espindola484291c2010-11-01 14:28:48 +000095 Alias->setVariableValue(Value);
96}
97
Matt Fleming3565a062010-08-16 18:57:57 +000098void MCELFStreamer::EmitSymbolAttribute(MCSymbol *Symbol,
99 MCSymbolAttr Attribute) {
100 // Indirect symbols are handled differently, to match how 'as' handles
101 // them. This makes writing matching .o files easier.
102 if (Attribute == MCSA_IndirectSymbol) {
103 // Note that we intentionally cannot use the symbol data here; this is
104 // important for matching the string table that 'as' generates.
105 IndirectSymbolData ISD;
106 ISD.Symbol = Symbol;
107 ISD.SectionData = getCurrentSectionData();
108 getAssembler().getIndirectSymbols().push_back(ISD);
109 return;
110 }
111
112 // Adding a symbol attribute always introduces the symbol, note that an
113 // important side effect of calling getOrCreateSymbolData here is to register
114 // the symbol with the assembler.
115 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
116
117 // The implementation of symbol attributes is designed to match 'as', but it
118 // leaves much to desired. It doesn't really make sense to arbitrarily add and
119 // remove flags, but 'as' allows this (in particular, see .desc).
120 //
121 // In the future it might be worth trying to make these operations more well
122 // defined.
123 switch (Attribute) {
124 case MCSA_LazyReference:
125 case MCSA_Reference:
126 case MCSA_NoDeadStrip:
Kevin Enderbye8e98d72010-11-19 18:39:33 +0000127 case MCSA_SymbolResolver:
Matt Fleming3565a062010-08-16 18:57:57 +0000128 case MCSA_PrivateExtern:
Matt Fleming3565a062010-08-16 18:57:57 +0000129 case MCSA_WeakDefinition:
Eli Friedmanf8020a32010-08-16 19:15:06 +0000130 case MCSA_WeakDefAutoPrivate:
Matt Fleming3565a062010-08-16 18:57:57 +0000131 case MCSA_Invalid:
132 case MCSA_ELF_TypeIndFunction:
133 case MCSA_IndirectSymbol:
134 assert(0 && "Invalid symbol attribute for ELF!");
135 break;
136
Rafael Espindola7e528a12010-11-14 01:34:31 +0000137 case MCSA_ELF_TypeGnuUniqueObject:
138 // Ignore for now.
139 break;
140
Matt Fleming3565a062010-08-16 18:57:57 +0000141 case MCSA_Global:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000142 MCELF::SetBinding(SD, ELF::STB_GLOBAL);
Matt Fleming3565a062010-08-16 18:57:57 +0000143 SD.setExternal(true);
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000144 BindingExplicitlySet.insert(Symbol);
Matt Fleming3565a062010-08-16 18:57:57 +0000145 break;
146
Benjamin Kramer230c2742010-09-02 17:18:32 +0000147 case MCSA_WeakReference:
Matt Fleming3565a062010-08-16 18:57:57 +0000148 case MCSA_Weak:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000149 MCELF::SetBinding(SD, ELF::STB_WEAK);
Rafael Espindola3223f192010-10-06 16:47:31 +0000150 SD.setExternal(true);
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000151 BindingExplicitlySet.insert(Symbol);
Matt Fleming3565a062010-08-16 18:57:57 +0000152 break;
153
154 case MCSA_Local:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000155 MCELF::SetBinding(SD, ELF::STB_LOCAL);
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000156 SD.setExternal(false);
157 BindingExplicitlySet.insert(Symbol);
Matt Fleming3565a062010-08-16 18:57:57 +0000158 break;
159
160 case MCSA_ELF_TypeFunction:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000161 MCELF::SetType(SD, ELF::STT_FUNC);
Matt Fleming3565a062010-08-16 18:57:57 +0000162 break;
163
164 case MCSA_ELF_TypeObject:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000165 MCELF::SetType(SD, ELF::STT_OBJECT);
Matt Fleming3565a062010-08-16 18:57:57 +0000166 break;
167
168 case MCSA_ELF_TypeTLS:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000169 MCELF::SetType(SD, ELF::STT_TLS);
Matt Fleming3565a062010-08-16 18:57:57 +0000170 break;
171
172 case MCSA_ELF_TypeCommon:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000173 MCELF::SetType(SD, ELF::STT_COMMON);
Matt Fleming3565a062010-08-16 18:57:57 +0000174 break;
175
176 case MCSA_ELF_TypeNoType:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000177 MCELF::SetType(SD, ELF::STT_NOTYPE);
Matt Fleming3565a062010-08-16 18:57:57 +0000178 break;
179
180 case MCSA_Protected:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000181 MCELF::SetVisibility(SD, ELF::STV_PROTECTED);
Matt Fleming3565a062010-08-16 18:57:57 +0000182 break;
183
184 case MCSA_Hidden:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000185 MCELF::SetVisibility(SD, ELF::STV_HIDDEN);
Matt Fleming3565a062010-08-16 18:57:57 +0000186 break;
187
188 case MCSA_Internal:
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000189 MCELF::SetVisibility(SD, ELF::STV_INTERNAL);
Matt Fleming3565a062010-08-16 18:57:57 +0000190 break;
191 }
192}
193
194void MCELFStreamer::EmitCommonSymbol(MCSymbol *Symbol, uint64_t Size,
195 unsigned ByteAlignment) {
196 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
197
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000198 if (!BindingExplicitlySet.count(Symbol)) {
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000199 MCELF::SetBinding(SD, ELF::STB_GLOBAL);
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000200 SD.setExternal(true);
201 }
202
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000203 MCELF::SetType(SD, ELF::STT_OBJECT);
Rafael Espindola55d02f32010-11-14 21:11:16 +0000204
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000205 if (MCELF::GetBinding(SD) == ELF_STB_Local) {
Matt Fleming3565a062010-08-16 18:57:57 +0000206 const MCSection *Section = getAssembler().getContext().getELFSection(".bss",
Rafael Espindolac85dca62011-01-23 04:28:49 +0000207 ELF::SHT_NOBITS,
Rafael Espindola1c130262011-01-23 04:43:11 +0000208 ELF::SHF_WRITE |
209 ELF::SHF_ALLOC,
Matt Fleming3565a062010-08-16 18:57:57 +0000210 SectionKind::getBSS());
Matt Fleming3565a062010-08-16 18:57:57 +0000211 Symbol->setSection(*Section);
Rafael Espindola19635722010-09-22 17:43:04 +0000212
Rafael Espindola9e3922e2010-09-29 14:52:01 +0000213 struct LocalCommon L = {&SD, Size, ByteAlignment};
214 LocalCommons.push_back(L);
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000215 } else {
216 SD.setCommon(Size, ByteAlignment);
Matt Fleming3565a062010-08-16 18:57:57 +0000217 }
218
Rafael Espindolaf7c10a32010-09-21 00:24:38 +0000219 SD.setSize(MCConstantExpr::Create(Size, getContext()));
Matt Fleming3565a062010-08-16 18:57:57 +0000220}
221
Jason W Kimf13743b2010-12-16 03:12:17 +0000222void MCELFStreamer::EmitLocalCommonSymbol(MCSymbol *Symbol, uint64_t Size) {
223 // FIXME: Should this be caught and done earlier?
224 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000225 MCELF::SetBinding(SD, ELF::STB_LOCAL);
Jason W Kimf13743b2010-12-16 03:12:17 +0000226 SD.setExternal(false);
227 BindingExplicitlySet.insert(Symbol);
228 // FIXME: ByteAlignment is not needed here, but is required.
229 EmitCommonSymbol(Symbol, Size, 1);
230}
231
Matt Fleming3565a062010-08-16 18:57:57 +0000232void MCELFStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
233 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into
234 // MCObjectStreamer.
235 getOrCreateDataFragment()->getContents().append(Data.begin(), Data.end());
236}
237
Matt Fleming3565a062010-08-16 18:57:57 +0000238void MCELFStreamer::EmitValueToAlignment(unsigned ByteAlignment,
239 int64_t Value, unsigned ValueSize,
240 unsigned MaxBytesToEmit) {
241 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into
242 // MCObjectStreamer.
243 if (MaxBytesToEmit == 0)
244 MaxBytesToEmit = ByteAlignment;
245 new MCAlignFragment(ByteAlignment, Value, ValueSize, MaxBytesToEmit,
246 getCurrentSectionData());
247
248 // Update the maximum alignment on the current section if necessary.
249 if (ByteAlignment > getCurrentSectionData()->getAlignment())
250 getCurrentSectionData()->setAlignment(ByteAlignment);
251}
252
253void MCELFStreamer::EmitCodeAlignment(unsigned ByteAlignment,
254 unsigned MaxBytesToEmit) {
255 // TODO: This is exactly the same as WinCOFFStreamer. Consider merging into
256 // MCObjectStreamer.
257 if (MaxBytesToEmit == 0)
258 MaxBytesToEmit = ByteAlignment;
259 MCAlignFragment *F = new MCAlignFragment(ByteAlignment, 0, 1, MaxBytesToEmit,
260 getCurrentSectionData());
261 F->setEmitNops(true);
262
263 // Update the maximum alignment on the current section if necessary.
264 if (ByteAlignment > getCurrentSectionData()->getAlignment())
265 getCurrentSectionData()->setAlignment(ByteAlignment);
266}
267
Matt Fleming3565a062010-08-16 18:57:57 +0000268// Add a symbol for the file name of this module. This is the second
269// entry in the module's symbol table (the first being the null symbol).
270void MCELFStreamer::EmitFileDirective(StringRef Filename) {
271 MCSymbol *Symbol = getAssembler().getContext().GetOrCreateSymbol(Filename);
Rafael Espindola7768a9d2011-02-16 01:08:29 +0000272 Symbol->setSection(*getCurrentSection());
Matt Fleming3565a062010-08-16 18:57:57 +0000273 Symbol->setAbsolute();
274
275 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(*Symbol);
276
277 SD.setFlags(ELF_STT_File | ELF_STB_Local | ELF_STV_Default);
278}
279
Rafael Espindola97551272010-11-24 02:19:40 +0000280void MCELFStreamer::fixSymbolsInTLSFixups(const MCExpr *expr) {
281 switch (expr->getKind()) {
282 case MCExpr::Target: llvm_unreachable("Can't handle target exprs yet!");
283 case MCExpr::Constant:
284 break;
285
286 case MCExpr::Binary: {
287 const MCBinaryExpr *be = cast<MCBinaryExpr>(expr);
288 fixSymbolsInTLSFixups(be->getLHS());
289 fixSymbolsInTLSFixups(be->getRHS());
290 break;
291 }
292
293 case MCExpr::SymbolRef: {
294 const MCSymbolRefExpr &symRef = *cast<MCSymbolRefExpr>(expr);
Rafael Espindolabf8209d2010-11-24 18:51:21 +0000295 switch (symRef.getKind()) {
296 default:
Rafael Espindola97551272010-11-24 02:19:40 +0000297 return;
Joerg Sonnenbergerd02c8b62011-03-17 00:35:10 +0000298 case MCSymbolRefExpr::VK_GOTTPOFF:
299 case MCSymbolRefExpr::VK_INDNTPOFF:
Rafael Espindolabf8209d2010-11-24 18:51:21 +0000300 case MCSymbolRefExpr::VK_NTPOFF:
301 case MCSymbolRefExpr::VK_GOTNTPOFF:
302 case MCSymbolRefExpr::VK_TLSGD:
Joerg Sonnenbergerd02c8b62011-03-17 00:35:10 +0000303 case MCSymbolRefExpr::VK_TLSLD:
Rafael Espindolabf8209d2010-11-24 18:51:21 +0000304 case MCSymbolRefExpr::VK_TLSLDM:
305 case MCSymbolRefExpr::VK_TPOFF:
306 case MCSymbolRefExpr::VK_DTPOFF:
Rafael Espindolabf8209d2010-11-24 18:51:21 +0000307 case MCSymbolRefExpr::VK_ARM_TLSGD:
Joerg Sonnenbergerd02c8b62011-03-17 00:35:10 +0000308 case MCSymbolRefExpr::VK_ARM_TPOFF:
309 case MCSymbolRefExpr::VK_ARM_GOTTPOFF:
Rafael Espindolabf8209d2010-11-24 18:51:21 +0000310 break;
311 }
Rafael Espindola97551272010-11-24 02:19:40 +0000312 MCSymbolData &SD = getAssembler().getOrCreateSymbolData(symRef.getSymbol());
Jan Sjödin2ddfd952011-02-28 21:45:04 +0000313 MCELF::SetType(SD, ELF::STT_TLS);
Rafael Espindola97551272010-11-24 02:19:40 +0000314 break;
315 }
316
317 case MCExpr::Unary:
318 fixSymbolsInTLSFixups(cast<MCUnaryExpr>(expr)->getSubExpr());
319 break;
320 }
321}
322
Benjamin Kramer93ded732010-08-27 10:40:51 +0000323void MCELFStreamer::EmitInstToFragment(const MCInst &Inst) {
Rafael Espindoladedb0452010-12-02 05:44:06 +0000324 this->MCObjectStreamer::EmitInstToFragment(Inst);
325 MCInstFragment &F = *cast<MCInstFragment>(getCurrentFragment());
Benjamin Kramer93ded732010-08-27 10:40:51 +0000326
Rafael Espindoladedb0452010-12-02 05:44:06 +0000327 for (unsigned i = 0, e = F.getFixups().size(); i != e; ++i)
328 fixSymbolsInTLSFixups(F.getFixups()[i].getValue());
Benjamin Kramer93ded732010-08-27 10:40:51 +0000329}
330
331void MCELFStreamer::EmitInstToData(const MCInst &Inst) {
332 MCDataFragment *DF = getOrCreateDataFragment();
333
334 SmallVector<MCFixup, 4> Fixups;
335 SmallString<256> Code;
336 raw_svector_ostream VecOS(Code);
337 getAssembler().getEmitter().EncodeInstruction(Inst, VecOS, Fixups);
338 VecOS.flush();
339
Rafael Espindola97551272010-11-24 02:19:40 +0000340 for (unsigned i = 0, e = Fixups.size(); i != e; ++i)
341 fixSymbolsInTLSFixups(Fixups[i].getValue());
342
Benjamin Kramer93ded732010-08-27 10:40:51 +0000343 // Add the fixups and data.
344 for (unsigned i = 0, e = Fixups.size(); i != e; ++i) {
345 Fixups[i].setOffset(Fixups[i].getOffset() + DF->getContents().size());
346 DF->addFixup(Fixups[i]);
347 }
348 DF->getContents().append(Code.begin(), Code.end());
349}
350
Matt Fleming3565a062010-08-16 18:57:57 +0000351void MCELFStreamer::Finish() {
Rafael Espindolac25dad82011-05-10 03:14:15 +0000352 EmitFrames(true);
Rafael Espindolac70a1d92010-11-01 17:07:14 +0000353
Rafael Espindola9e3922e2010-09-29 14:52:01 +0000354 for (std::vector<LocalCommon>::const_iterator i = LocalCommons.begin(),
355 e = LocalCommons.end();
356 i != e; ++i) {
357 MCSymbolData *SD = i->SD;
358 uint64_t Size = i->Size;
359 unsigned ByteAlignment = i->ByteAlignment;
360 const MCSymbol &Symbol = SD->getSymbol();
361 const MCSection &Section = Symbol.getSection();
362
363 MCSectionData &SectData = getAssembler().getOrCreateSectionData(Section);
364 new MCAlignFragment(ByteAlignment, 0, 1, ByteAlignment, &SectData);
365
366 MCFragment *F = new MCFillFragment(0, 0, Size, &SectData);
367 SD->setFragment(F);
368
369 // Update the maximum alignment of the section if necessary.
370 if (ByteAlignment > SectData.getAlignment())
371 SectData.setAlignment(ByteAlignment);
372 }
373
Rafael Espindola73ffea42010-09-25 05:42:19 +0000374 this->MCObjectStreamer::Finish();
Matt Fleming3565a062010-08-16 18:57:57 +0000375}
376
Evan Cheng78c10ee2011-07-25 23:24:55 +0000377MCStreamer *llvm::createELFStreamer(MCContext &Context, MCAsmBackend &MAB,
Rafael Espindola96aa78c2011-01-23 17:55:27 +0000378 raw_ostream &OS, MCCodeEmitter *CE,
379 bool RelaxAll, bool NoExecStack) {
Evan Cheng78c10ee2011-07-25 23:24:55 +0000380 MCELFStreamer *S = new MCELFStreamer(Context, MAB, OS, CE);
Matt Fleming3565a062010-08-16 18:57:57 +0000381 if (RelaxAll)
382 S->getAssembler().setRelaxAll(true);
Rafael Espindola96aa78c2011-01-23 17:55:27 +0000383 if (NoExecStack)
384 S->getAssembler().setNoExecStack(true);
Matt Fleming3565a062010-08-16 18:57:57 +0000385 return S;
386}