diff options
Diffstat (limited to 'lib/Target/X86/X86TargetAsmInfo.cpp')
-rw-r--r-- | lib/Target/X86/X86TargetAsmInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp index 7636d77..4aa9d4c 100644 --- a/lib/Target/X86/X86TargetAsmInfo.cpp +++ b/lib/Target/X86/X86TargetAsmInfo.cpp @@ -128,6 +128,7 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { break; case X86Subtarget::isELF: + case X86Subtarget::isELFLinux: ReadOnlySection = "\t.section\t.rodata"; FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4"; EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8"; @@ -229,6 +230,10 @@ X86TargetAsmInfo::X86TargetAsmInfo(const X86TargetMachine &TM) { SectionEndDirectiveSuffix = "\tends\n"; } + // On Linux we must declare when we can use a non-executable stack. + if (Subtarget->isTargetLinux()) + NonexecutableStackDirective = "\t.section\t.note.GNU-stack,\"\",@progbits"; + AssemblerDialect = Subtarget->getAsmFlavor(); } |