diff options
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/LayoutPass.cpp')
-rw-r--r-- | lld/lib/ReaderWriter/MachO/LayoutPass.cpp | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lld/lib/ReaderWriter/MachO/LayoutPass.cpp b/lld/lib/ReaderWriter/MachO/LayoutPass.cpp index a06880a3c11..2d096e4c1a6 100644 --- a/lld/lib/ReaderWriter/MachO/LayoutPass.cpp +++ b/lld/lib/ReaderWriter/MachO/LayoutPass.cpp @@ -166,13 +166,12 @@ void LayoutPass::checkFollowonChain(MutableFile::DefinedAtomRange &range) { #endif // #ifndef NDEBUG /// The function compares atoms by sorting atoms in the following order -/// a) Sorts atoms by Section position preference -/// b) Sorts atoms by their ordinal overrides (layout-after/ingroup) -/// c) Sorts atoms by their permissions -/// d) Sorts atoms by their content -/// e) Sorts atoms by custom sorter -/// f) Sorts atoms on how they appear using File Ordinality -/// g) Sorts atoms on how they appear within the File +/// a) Sorts atoms by their ordinal overrides (layout-after/ingroup) +/// b) Sorts atoms by their permissions +/// c) Sorts atoms by their content +/// d) Sorts atoms by custom sorter +/// e) Sorts atoms on how they appear using File Ordinality +/// f) Sorts atoms on how they appear within the File static bool compareAtomsSub(const LayoutPass::SortKey &lc, const LayoutPass::SortKey &rc, LayoutPass::SortOverride customSorter, @@ -184,19 +183,6 @@ static bool compareAtomsSub(const LayoutPass::SortKey &lc, return false; } - // Sort by section position preference. - DefinedAtom::SectionPosition leftPos = left->sectionPosition(); - DefinedAtom::SectionPosition rightPos = right->sectionPosition(); - - bool leftSpecialPos = (leftPos != DefinedAtom::sectionPositionAny); - bool rightSpecialPos = (rightPos != DefinedAtom::sectionPositionAny); - if (leftSpecialPos || rightSpecialPos) { - if (leftPos != rightPos) { - DEBUG(reason = formatReason("sectionPos", (int)leftPos, (int)rightPos)); - return leftPos < rightPos; - } - } - // Find the root of the chain if it is a part of a follow-on chain. const DefinedAtom *leftRoot = lc._root; const DefinedAtom *rightRoot = rc._root; |