mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Simplify handling of --noexecstack by using getNonexecutableStackSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219799 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -9260,7 +9260,7 @@ bool ARMAsmParser::parseDirectiveEven(SMLoc L) {
|
||||
}
|
||||
|
||||
if (!Section) {
|
||||
getStreamer().InitSections();
|
||||
getStreamer().InitSections(false);
|
||||
Section = getStreamer().getCurrentSection().first;
|
||||
}
|
||||
|
||||
|
@@ -1347,10 +1347,9 @@ MCStreamer *createARMNullStreamer(MCContext &Ctx) {
|
||||
return S;
|
||||
}
|
||||
|
||||
MCELFStreamer* createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
||||
raw_ostream &OS, MCCodeEmitter *Emitter,
|
||||
bool RelaxAll, bool NoExecStack,
|
||||
bool IsThumb) {
|
||||
MCELFStreamer *createARMELFStreamer(MCContext &Context, MCAsmBackend &TAB,
|
||||
raw_ostream &OS, MCCodeEmitter *Emitter,
|
||||
bool RelaxAll, bool IsThumb) {
|
||||
ARMELFStreamer *S = new ARMELFStreamer(Context, TAB, OS, Emitter, IsThumb);
|
||||
new ARMTargetELFStreamer(*S);
|
||||
// FIXME: This should eventually end up somewhere else where more
|
||||
@@ -1360,8 +1359,6 @@ MCStreamer *createARMNullStreamer(MCContext &Ctx) {
|
||||
|
||||
if (RelaxAll)
|
||||
S->getAssembler().setRelaxAll(true);
|
||||
if (NoExecStack)
|
||||
S->getAssembler().setNoExecStack(true);
|
||||
return S;
|
||||
}
|
||||
|
||||
|
@@ -265,11 +265,8 @@ static MCCodeGenInfo *createARMMCCodeGenInfo(StringRef TT, Reloc::Model RM,
|
||||
// This is duplicated code. Refactor this.
|
||||
static MCStreamer *createMCStreamer(const Target &T, StringRef TT,
|
||||
MCContext &Ctx, MCAsmBackend &MAB,
|
||||
raw_ostream &OS,
|
||||
MCCodeEmitter *Emitter,
|
||||
const MCSubtargetInfo &STI,
|
||||
bool RelaxAll,
|
||||
bool NoExecStack) {
|
||||
raw_ostream &OS, MCCodeEmitter *Emitter,
|
||||
const MCSubtargetInfo &STI, bool RelaxAll) {
|
||||
Triple TheTriple(TT);
|
||||
|
||||
switch (TheTriple.getObjectFormat()) {
|
||||
@@ -283,7 +280,7 @@ static MCStreamer *createMCStreamer(const Target &T, StringRef TT,
|
||||
assert(TheTriple.isOSWindows() && "non-Windows ARM COFF is not supported");
|
||||
return createARMWinCOFFStreamer(Ctx, MAB, *Emitter, OS);
|
||||
case Triple::ELF:
|
||||
return createARMELFStreamer(Ctx, MAB, OS, Emitter, false, NoExecStack,
|
||||
return createARMELFStreamer(Ctx, MAB, OS, Emitter, false,
|
||||
TheTriple.getArch() == Triple::thumb);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user