diff --git a/lld/MachO/Config.h b/lld/MachO/Config.h --- a/lld/MachO/Config.h +++ b/lld/MachO/Config.h @@ -131,9 +131,6 @@ bool omitDebugInfo = false; bool warnDylibInstallName = false; bool ignoreOptimizationHints = false; - // Temporary config flag that will be removed once we have fully implemented - // support for __eh_frame. - bool parseEhFrames = false; uint32_t headerPad; uint32_t dylibCompatibilityVersion = 0; uint32_t dylibCurrentVersion = 0; diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp --- a/lld/MachO/Driver.cpp +++ b/lld/MachO/Driver.cpp @@ -1305,7 +1305,6 @@ config->callGraphProfileSort = args.hasFlag( OPT_call_graph_profile_sort, OPT_no_call_graph_profile_sort, true); config->printSymbolOrder = args.getLastArgValue(OPT_print_symbol_order); - config->parseEhFrames = static_cast(getenv("LLD_IN_TEST")); // FIXME: Add a commandline flag for this too. config->zeroModTime = getenv("ZERO_AR_DATE"); diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp --- a/lld/MachO/InputFiles.cpp +++ b/lld/MachO/InputFiles.cpp @@ -347,7 +347,7 @@ section.subsections.push_back({0, isec}); } else if (auto recordSize = getRecordSize(segname, name)) { splitRecords(*recordSize); - } else if (config->parseEhFrames && name == section_names::ehFrame && + } else if (name == section_names::ehFrame && segname == segment_names::text) { splitEhFrames(data, *sections.back()); } else if (segname == segment_names::llvm) { @@ -1117,7 +1117,7 @@ } if (compactUnwindSection) registerCompactUnwind(*compactUnwindSection); - if (config->parseEhFrames && ehFrameSection) + if (ehFrameSection) registerEhFrames(*ehFrameSection); }