diff -rupN llvm/include/llvm/Target/TargetOptions.h llvm.patched/include/llvm/Target/TargetOptions.h
--- llvm/include/llvm/Target/TargetOptions.h	2018-07-23 18:09:49.827189042 +0100
+++ llvm.patched/include/llvm/Target/TargetOptions.h	2018-07-23 18:11:08.132482675 +0100
@@ -108,7 +108,7 @@ namespace llvm {
           DisableIntegratedAS(false), RelaxELFRelocations(false),
           FunctionSections(false), DataSections(false),
           UniqueSectionNames(true), TrapUnreachable(false), EmulatedTLS(false),
-          EnableIPRA(false), EmitStackSizeSection(false) {}
+          EnableIPRA(false), EmitStackSizeSection(false), NoExceptions(false) {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
     /// option is specified on the command line, and should enable debugging
@@ -219,6 +219,8 @@ namespace llvm {
     /// Emit section containing metadata on function stack sizes.
     unsigned EmitStackSizeSection : 1;
 
+    /// No Exceptions
+    unsigned NoExceptions : 1;
     /// FloatABIType - This setting is set by -float-abi=xxx option is specfied
     /// on the command line. This setting may either be Default, Soft, or Hard.
     /// Default selects the target's default behavior. Soft selects the ABI for
diff -rupN llvm/lib/CodeGen/LLVMTargetMachine.cpp llvm.patched/lib/CodeGen/LLVMTargetMachine.cpp
--- llvm/lib/CodeGen/LLVMTargetMachine.cpp	2018-07-23 18:09:51.507216779 +0100
+++ llvm.patched/lib/CodeGen/LLVMTargetMachine.cpp	2018-07-23 18:11:08.132482675 +0100
@@ -63,7 +63,7 @@ void LLVMTargetMachine::initAsmInfo() {
 
   TmpAsmInfo->setRelaxELFRelocations(Options.RelaxELFRelocations);
 
-  if (Options.ExceptionModel != ExceptionHandling::None)
+  if (Options.ExceptionModel != ExceptionHandling::None || Options.NoExceptions)
     TmpAsmInfo->setExceptionsType(Options.ExceptionModel);
 
   AsmInfo = TmpAsmInfo;
diff -rupN llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp llvm.patched/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
--- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp	2018-07-23 18:09:51.495216575 +0100
+++ llvm.patched/lib/CodeGen/TargetLoweringObjectFileImpl.cpp	2018-07-23 18:11:08.128482609 +0100
@@ -342,18 +342,20 @@ MCSection *TargetLoweringObjectFileELF::
 /// Return the section prefix name used by options FunctionsSections and
 /// DataSections.
 static StringRef getSectionPrefixForGlobal(SectionKind Kind) {
+  extern const char *bssName, *textName, *dataName, *rodataName;
+
   if (Kind.isText())
-    return ".text";
+    return textName;
   if (Kind.isReadOnly())
-    return ".rodata";
+    return rodataName;
   if (Kind.isBSS())
-    return ".bss";
+    return bssName;
   if (Kind.isThreadData())
     return ".tdata";
   if (Kind.isThreadBSS())
     return ".tbss";
   if (Kind.isData())
-    return ".data";
+    return dataName;
   assert(Kind.isReadOnlyWithRel() && "Unknown section kind");
   return ".data.rel.ro";
 }
diff -rupN llvm/lib/MC/MCObjectFileInfo.cpp llvm.patched/lib/MC/MCObjectFileInfo.cpp
--- llvm/lib/MC/MCObjectFileInfo.cpp	2018-07-23 18:09:51.491216509 +0100
+++ llvm.patched/lib/MC/MCObjectFileInfo.cpp	2018-07-23 18:11:08.128482609 +0100
@@ -22,6 +22,11 @@
 
 using namespace llvm;
 
+const char *bssName = ".bss";
+const char *textName = ".text";
+const char *dataName = ".data";
+const char *rodataName = ".rodata";
+
 static bool useCompactUnwind(const Triple &T) {
   // Only on darwin.
   if (!T.isOSDarwin())
@@ -465,17 +470,17 @@ void MCObjectFileInfo::initELFMCObjectFi
     EHSectionFlags |= ELF::SHF_WRITE;
 
   // ELF
-  BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
+  BSSSection = Ctx->getELFSection(bssName, ELF::SHT_NOBITS,
                                   ELF::SHF_WRITE | ELF::SHF_ALLOC);
 
-  TextSection = Ctx->getELFSection(".text", ELF::SHT_PROGBITS,
+  TextSection = Ctx->getELFSection(textName, ELF::SHT_PROGBITS,
                                    ELF::SHF_EXECINSTR | ELF::SHF_ALLOC);
 
-  DataSection = Ctx->getELFSection(".data", ELF::SHT_PROGBITS,
+  DataSection = Ctx->getELFSection(dataName, ELF::SHT_PROGBITS,
                                    ELF::SHF_WRITE | ELF::SHF_ALLOC);
 
   ReadOnlySection =
-      Ctx->getELFSection(".rodata", ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
+      Ctx->getELFSection(rodataName, ELF::SHT_PROGBITS, ELF::SHF_ALLOC);
 
   TLSDataSection =
       Ctx->getELFSection(".tdata", ELF::SHT_PROGBITS,
diff -rupN llvm/tools/clang/include/clang/Driver/CC1Options.td llvm.patched/tools/clang/include/clang/Driver/CC1Options.td
--- llvm/tools/clang/include/clang/Driver/CC1Options.td	2018-07-23 18:09:50.683203167 +0100
+++ llvm.patched/tools/clang/include/clang/Driver/CC1Options.td	2018-07-23 18:11:08.128482609 +0100
@@ -799,6 +799,19 @@ def fno_cuda_host_device_constexpr : Fla
   HelpText<"Don't treat unattributed constexpr functions as __host__ __device__.">;
 
 //===----------------------------------------------------------------------===//
+// Section Naming Options
+//===----------------------------------------------------------------------===//
+
+def mbss_EQ : Joined<["-"], "mbss=">,
+  HelpText<"name the .bss section">;
+def mdata_EQ : Joined<["-"], "mdata=">,
+  HelpText<"name the .data section">;
+def mrodata_EQ : Joined<["-"], "mrodata=">,
+  HelpText<"name the .rodata section">;
+def mtext_EQ : Joined<["-"], "mtext=">,
+  HelpText<"name the .text section">;
+
+//===----------------------------------------------------------------------===//
 // OpenMP Options
 //===----------------------------------------------------------------------===//
 
diff -rupN llvm/tools/clang/lib/CodeGen/BackendUtil.cpp llvm.patched/tools/clang/lib/CodeGen/BackendUtil.cpp
--- llvm/tools/clang/lib/CodeGen/BackendUtil.cpp	2018-07-23 18:09:51.351214198 +0100
+++ llvm.patched/tools/clang/lib/CodeGen/BackendUtil.cpp	2018-07-23 18:11:08.132482675 +0100
@@ -437,6 +437,8 @@ static void initTargetOptions(llvm::Targ
     Options.ExceptionModel = llvm::ExceptionHandling::WinEH;
   if (LangOpts.DWARFExceptions)
     Options.ExceptionModel = llvm::ExceptionHandling::DwarfCFI;
+  if (!LangOpts.Exceptions && !LangOpts.CXXExceptions && !CodeGenOpts.UnwindTables)
+    Options.NoExceptions = true;
 
   Options.NoInfsFPMath = CodeGenOpts.NoInfsFPMath;
   Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;
diff -rupN llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp llvm.patched/tools/clang/lib/Frontend/CompilerInvocation.cpp
--- llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp	2018-07-23 18:09:51.331213868 +0100
+++ llvm.patched/tools/clang/lib/Frontend/CompilerInvocation.cpp	2018-07-23 18:11:08.128482609 +0100
@@ -155,6 +155,11 @@ static void getAllNoBuiltinFuncValues(Ar
   Funcs.insert(Funcs.end(), Values.begin(), Values.end());
 }
 
+extern const char *bssName;
+extern const char *textName;
+extern const char *dataName;
+extern const char *rodataName;
+
 static bool ParseAnalyzerArgs(AnalyzerOptions &Opts, ArgList &Args,
                               DiagnosticsEngine &Diags) {
   using namespace options;
@@ -943,6 +948,19 @@ static bool ParseCodeGenArgs(CodeGenOpti
   if (!Opts.OptRecordFile.empty())
     NeedLocTracking = true;
 
+  if (Arg *A = Args.getLastArg(OPT_mbss_EQ)) {
+    bssName = A->getValue();
+  }
+  if (Arg *A = Args.getLastArg(OPT_mdata_EQ)) {
+    dataName = A->getValue();
+  }
+  if (Arg *A = Args.getLastArg(OPT_mrodata_EQ)) {
+    rodataName = A->getValue();
+  }
+  if (Arg *A = Args.getLastArg(OPT_mtext_EQ)) {
+    textName = A->getValue();
+  }
+
   if (Arg *A = Args.getLastArg(OPT_Rpass_EQ)) {
     Opts.OptimizationRemarkPattern =
         GenerateOptimizationRemarkRegex(Diags, Args, A);
