diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp | 6 | ||||
-rw-r--r-- | lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp index f440cede201..9280ec43320 100644 --- a/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp +++ b/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp @@ -337,11 +337,15 @@ private: << " has " << entriesInPage << " entries\n"); } while (pageStart < unwindInfos.size()); - // FIXME: we should also erase all compact-unwind atoms; their job is done. UnwindInfoAtom *unwind = new (_file.allocator()) UnwindInfoAtom(_archHandler, _file, _isBig, std::vector<uint32_t>(), personalities, pages, numLSDAs); mergedFile->addAtom(*unwind); + + // Finally, remove all __compact_unwind atoms now that we've processed them. + mergedFile->removeDefinedAtomsIf([](const DefinedAtom *atom) { + return atom->contentType() == DefinedAtom::typeCompactUnwindInfo; + }); } void collectCompactUnwindEntries( diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp index 4a4ba792028..dc015c5f296 100644 --- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp +++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp @@ -231,12 +231,6 @@ const MachOFinalSectionFromAtomType sectsToAtomType[] = { ENTRY("__DATA", "___got", S_NON_LAZY_SYMBOL_POINTERS, typeGOT), ENTRY("__DATA", "___bss", S_ZEROFILL, typeZeroFill), - - // FIXME: __compact_unwind actually needs to be processed by a pass and put - // into __TEXT,__unwind_info. For now, forwarding it back to - // __LD,__compact_unwind is harmless (it's ignored by the unwinder, which then - // proceeds to process __TEXT,__eh_frame for its instructions). - ENTRY("__LD", "__compact_unwind", S_REGULAR, typeCompactUnwindInfo), }; #undef ENTRY |