diff --git a/.gitignore b/.gitignore index 0083a92..0b6167d 100644 --- a/.gitignore +++ b/.gitignore @@ -59,3 +59,5 @@ /lld-11.1.0rc1.src.tar.xz.sig /lld-11.1.0rc2.src.tar.xz /lld-11.1.0rc2.src.tar.xz.sig +/lld-12.0.0rc1.src.tar.xz +/lld-12.0.0rc1.src.tar.xz.sig diff --git a/0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch b/0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch index 597ebb9..a081767 100644 --- a/0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch +++ b/0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch @@ -177,10 +177,10 @@ This reverts commit 03f43b3aca363e16c45d8733400fd0083b1af4d8. delete mode 100644 lld/test/MachO/x86-64-reloc-signed.s delete mode 100644 lld/test/MachO/x86-64-reloc-unsigned.s -diff --git a/lld/CMakeLists.txt b/lld/CMakeLists.txt +diff --git a/CMakeLists.txt b/CMakeLists.txt index 5090c935e75..a0f2132c0f5 100644 ---- a/lld/CMakeLists.txt -+++ b/lld/CMakeLists.txt +--- a/CMakeLists.txt ++++ b/CMakeLists.txt @@ -223,7 +223,6 @@ endif() add_subdirectory(docs) add_subdirectory(COFF) @@ -189,10 +189,10 @@ index 5090c935e75..a0f2132c0f5 100644 add_subdirectory(MinGW) add_subdirectory(wasm) -diff --git a/lld/MachO/Arch/X86_64.cpp b/lld/MachO/Arch/X86_64.cpp +diff --git a/MachO/Arch/X86_64.cpp b/MachO/Arch/X86_64.cpp deleted file mode 100644 index 36f686ca2f1..00000000000 ---- a/lld/MachO/Arch/X86_64.cpp +--- a/MachO/Arch/X86_64.cpp +++ /dev/null @@ -1,286 +0,0 @@ -//===- X86_64.cpp ---------------------------------------------------------===// @@ -481,10 +481,10 @@ index 36f686ca2f1..00000000000 - static X86_64 t; - return &t; -} -diff --git a/lld/MachO/CMakeLists.txt b/lld/MachO/CMakeLists.txt +diff --git a/MachO/CMakeLists.txt b/MachO/CMakeLists.txt deleted file mode 100644 index 6fe356f5158..00000000000 ---- a/lld/MachO/CMakeLists.txt +--- a/MachO/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -set(LLVM_TARGET_DEFINITIONS Options.td) @@ -523,10 +523,10 @@ index 6fe356f5158..00000000000 - MachOOptionsTableGen - ${tablegen_deps} - ) -diff --git a/lld/MachO/Config.h b/lld/MachO/Config.h +diff --git a/MachO/Config.h b/MachO/Config.h deleted file mode 100644 index 79812a43356..00000000000 ---- a/lld/MachO/Config.h +--- a/MachO/Config.h +++ /dev/null @@ -1,57 +0,0 @@ -//===- Config.h -------------------------------------------------*- C++ -*-===// @@ -586,10 +586,10 @@ index 79812a43356..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/Driver.cpp b/lld/MachO/Driver.cpp +diff --git a/MachO/Driver.cpp b/MachO/Driver.cpp deleted file mode 100644 index 2a3b0042162..00000000000 ---- a/lld/MachO/Driver.cpp +--- a/MachO/Driver.cpp +++ /dev/null @@ -1,451 +0,0 @@ -//===- Driver.cpp ---------------------------------------------------------===// @@ -1043,10 +1043,10 @@ index 2a3b0042162..00000000000 - freeArena(); - return !errorCount(); -} -diff --git a/lld/MachO/Driver.h b/lld/MachO/Driver.h +diff --git a/MachO/Driver.h b/MachO/Driver.h deleted file mode 100644 index 2233740d1db..00000000000 ---- a/lld/MachO/Driver.h +--- a/MachO/Driver.h +++ /dev/null @@ -1,36 +0,0 @@ -//===- Driver.h -------------------------------------------------*- C++ -*-===// @@ -1085,10 +1085,10 @@ index 2233740d1db..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/ExportTrie.cpp b/lld/MachO/ExportTrie.cpp +diff --git a/MachO/ExportTrie.cpp b/MachO/ExportTrie.cpp deleted file mode 100644 index 7cc81bcfd5f..00000000000 ---- a/lld/MachO/ExportTrie.cpp +--- a/MachO/ExportTrie.cpp +++ /dev/null @@ -1,283 +0,0 @@ -//===- ExportTrie.cpp -----------------------------------------------------===// @@ -1374,10 +1374,10 @@ index 7cc81bcfd5f..00000000000 - - TrieParser(buf, size, callback).parse(); -} -diff --git a/lld/MachO/ExportTrie.h b/lld/MachO/ExportTrie.h +diff --git a/MachO/ExportTrie.h b/MachO/ExportTrie.h deleted file mode 100644 index 2bd8c33db9a..00000000000 ---- a/lld/MachO/ExportTrie.h +--- a/MachO/ExportTrie.h +++ /dev/null @@ -1,47 +0,0 @@ -//===- ExportTrie.h ---------------------------------------------*- C++ -*-===// @@ -1427,10 +1427,10 @@ index 2bd8c33db9a..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/InputFiles.cpp b/lld/MachO/InputFiles.cpp +diff --git a/MachO/InputFiles.cpp b/MachO/InputFiles.cpp deleted file mode 100644 index 46fe82f9882..00000000000 ---- a/lld/MachO/InputFiles.cpp +--- a/MachO/InputFiles.cpp +++ /dev/null @@ -1,433 +0,0 @@ -//===- InputFiles.cpp -----------------------------------------------------===// @@ -1866,10 +1866,10 @@ index 46fe82f9882..00000000000 -std::string lld::toString(const InputFile *file) { - return file ? std::string(file->getName()) : ""; -} -diff --git a/lld/MachO/InputFiles.h b/lld/MachO/InputFiles.h +diff --git a/MachO/InputFiles.h b/MachO/InputFiles.h deleted file mode 100644 index bc5ad86ccaa..00000000000 ---- a/lld/MachO/InputFiles.h +--- a/MachO/InputFiles.h +++ /dev/null @@ -1,121 +0,0 @@ -//===- InputFiles.h ---------------------------------------------*- C++ -*-===// @@ -1993,10 +1993,10 @@ index bc5ad86ccaa..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/InputSection.cpp b/lld/MachO/InputSection.cpp +diff --git a/MachO/InputSection.cpp b/MachO/InputSection.cpp deleted file mode 100644 index 72d48928305..00000000000 ---- a/lld/MachO/InputSection.cpp +--- a/MachO/InputSection.cpp +++ /dev/null @@ -1,48 +0,0 @@ -//===- InputSection.cpp ---------------------------------------------------===// @@ -2047,10 +2047,10 @@ index 72d48928305..00000000000 - target->relocateOne(buf + r.offset, r, val); - } -} -diff --git a/lld/MachO/InputSection.h b/lld/MachO/InputSection.h +diff --git a/MachO/InputSection.h b/MachO/InputSection.h deleted file mode 100644 index 96ae0cbe6ea..00000000000 ---- a/lld/MachO/InputSection.h +--- a/MachO/InputSection.h +++ /dev/null @@ -1,74 +0,0 @@ -//===- InputSection.h -------------------------------------------*- C++ -*-===// @@ -2127,10 +2127,10 @@ index 96ae0cbe6ea..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/MachOStructs.h b/lld/MachO/MachOStructs.h +diff --git a/MachO/MachOStructs.h b/MachO/MachOStructs.h deleted file mode 100644 index 69b50ec2317..00000000000 ---- a/lld/MachO/MachOStructs.h +--- a/MachO/MachOStructs.h +++ /dev/null @@ -1,36 +0,0 @@ -//===- MachOStructs.h -------------------------------------------*- C++ -*-===// @@ -2169,10 +2169,10 @@ index 69b50ec2317..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/MergedOutputSection.cpp b/lld/MachO/MergedOutputSection.cpp +diff --git a/MachO/MergedOutputSection.cpp b/MachO/MergedOutputSection.cpp deleted file mode 100644 index 2d0be253834..00000000000 ---- a/lld/MachO/MergedOutputSection.cpp +--- a/MachO/MergedOutputSection.cpp +++ /dev/null @@ -1,74 +0,0 @@ -//===- OutputSection.cpp --------------------------------------------------===// @@ -2249,10 +2249,10 @@ index 2d0be253834..00000000000 - flags |= inputFlags; - flags &= pureMask; -} -diff --git a/lld/MachO/MergedOutputSection.h b/lld/MachO/MergedOutputSection.h +diff --git a/MachO/MergedOutputSection.h b/MachO/MergedOutputSection.h deleted file mode 100644 index 279a7e0f75c..00000000000 ---- a/lld/MachO/MergedOutputSection.h +--- a/MachO/MergedOutputSection.h +++ /dev/null @@ -1,56 +0,0 @@ -//===- OutputSection.h ------------------------------------------*- C++ -*-===// @@ -2311,10 +2311,10 @@ index 279a7e0f75c..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/Options.td b/lld/MachO/Options.td +diff --git a/MachO/Options.td b/MachO/Options.td deleted file mode 100644 index 1e42542b9ac..00000000000 ---- a/lld/MachO/Options.td +--- a/MachO/Options.td +++ /dev/null @@ -1,1297 +0,0 @@ -include "llvm/Option/OptParser.td" @@ -3614,10 +3614,10 @@ index 1e42542b9ac..00000000000 - HelpText<"This option is ignored in ld64">, - Flags<[HelpHidden]>, - Group; -diff --git a/lld/MachO/OutputSection.cpp b/lld/MachO/OutputSection.cpp +diff --git a/MachO/OutputSection.cpp b/MachO/OutputSection.cpp deleted file mode 100644 index c006828267c..00000000000 ---- a/lld/MachO/OutputSection.cpp +--- a/MachO/OutputSection.cpp +++ /dev/null @@ -1,18 +0,0 @@ -//===- OutputSection.cpp --------------------------------------------------===// @@ -3638,10 +3638,10 @@ index c006828267c..00000000000 -uint64_t OutputSection::getSegmentOffset() const { - return addr - parent->firstSection()->addr; -} -diff --git a/lld/MachO/OutputSection.h b/lld/MachO/OutputSection.h +diff --git a/MachO/OutputSection.h b/MachO/OutputSection.h deleted file mode 100644 index 07b53a04639..00000000000 ---- a/lld/MachO/OutputSection.h +--- a/MachO/OutputSection.h +++ /dev/null @@ -1,74 +0,0 @@ -//===- OutputSection.h ------------------------------------------*- C++ -*-===// @@ -3718,10 +3718,10 @@ index 07b53a04639..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/OutputSegment.cpp b/lld/MachO/OutputSegment.cpp +diff --git a/MachO/OutputSegment.cpp b/MachO/OutputSegment.cpp deleted file mode 100644 index 5e57c49f5c0..00000000000 ---- a/lld/MachO/OutputSegment.cpp +--- a/MachO/OutputSegment.cpp +++ /dev/null @@ -1,67 +0,0 @@ -//===- OutputSegment.cpp --------------------------------------------------===// @@ -3791,10 +3791,10 @@ index 5e57c49f5c0..00000000000 - outputSegments.push_back(segRef); - return segRef; -} -diff --git a/lld/MachO/OutputSegment.h b/lld/MachO/OutputSegment.h +diff --git a/MachO/OutputSegment.h b/MachO/OutputSegment.h deleted file mode 100644 index d977c281272..00000000000 ---- a/lld/MachO/OutputSegment.h +--- a/MachO/OutputSegment.h +++ /dev/null @@ -1,62 +0,0 @@ -//===- OutputSegment.h ------------------------------------------*- C++ -*-===// @@ -3859,10 +3859,10 @@ index d977c281272..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/SymbolTable.cpp b/lld/MachO/SymbolTable.cpp +diff --git a/MachO/SymbolTable.cpp b/MachO/SymbolTable.cpp deleted file mode 100644 index 80e870d7989..00000000000 ---- a/lld/MachO/SymbolTable.cpp +--- a/MachO/SymbolTable.cpp +++ /dev/null @@ -1,87 +0,0 @@ -//===- SymbolTable.cpp ----------------------------------------------------===// @@ -3952,10 +3952,10 @@ index 80e870d7989..00000000000 -} - -SymbolTable *macho::symtab; -diff --git a/lld/MachO/SymbolTable.h b/lld/MachO/SymbolTable.h +diff --git a/MachO/SymbolTable.h b/MachO/SymbolTable.h deleted file mode 100644 index 2379008db56..00000000000 ---- a/lld/MachO/SymbolTable.h +--- a/MachO/SymbolTable.h +++ /dev/null @@ -1,50 +0,0 @@ -//===- SymbolTable.h --------------------------------------------*- C++ -*-===// @@ -4008,10 +4008,10 @@ index 2379008db56..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/Symbols.cpp b/lld/MachO/Symbols.cpp +diff --git a/MachO/Symbols.cpp b/MachO/Symbols.cpp deleted file mode 100644 index fbafa8a92a4..00000000000 ---- a/lld/MachO/Symbols.cpp +--- a/MachO/Symbols.cpp +++ /dev/null @@ -1,23 +0,0 @@ -//===- Symbols.cpp --------------------------------------------------------===// @@ -4037,10 +4037,10 @@ index fbafa8a92a4..00000000000 - return *s; - return std::string(sym.getName()); -} -diff --git a/lld/MachO/Symbols.h b/lld/MachO/Symbols.h +diff --git a/MachO/Symbols.h b/MachO/Symbols.h deleted file mode 100644 index 63748ee4832..00000000000 ---- a/lld/MachO/Symbols.h +--- a/MachO/Symbols.h +++ /dev/null @@ -1,138 +0,0 @@ -//===- Symbols.h ------------------------------------------------*- C++ -*-===// @@ -4181,10 +4181,10 @@ index 63748ee4832..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/SyntheticSections.cpp b/lld/MachO/SyntheticSections.cpp +diff --git a/MachO/SyntheticSections.cpp b/MachO/SyntheticSections.cpp deleted file mode 100644 index cc0d5a93c40..00000000000 ---- a/lld/MachO/SyntheticSections.cpp +--- a/MachO/SyntheticSections.cpp +++ /dev/null @@ -1,409 +0,0 @@ -//===- SyntheticSections.cpp ---------------------------------------------===// @@ -4596,10 +4596,10 @@ index cc0d5a93c40..00000000000 - off += str.size() + 1; // account for null terminator - } -} -diff --git a/lld/MachO/SyntheticSections.h b/lld/MachO/SyntheticSections.h +diff --git a/MachO/SyntheticSections.h b/MachO/SyntheticSections.h deleted file mode 100644 index a8fbf6c8a26..00000000000 ---- a/lld/MachO/SyntheticSections.h +--- a/MachO/SyntheticSections.h +++ /dev/null @@ -1,290 +0,0 @@ -//===- SyntheticSections.h -------------------------------------*- C++ -*-===// @@ -4892,10 +4892,10 @@ index a8fbf6c8a26..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/Target.cpp b/lld/MachO/Target.cpp +diff --git a/MachO/Target.cpp b/MachO/Target.cpp deleted file mode 100644 index 0f70776a507..00000000000 ---- a/lld/MachO/Target.cpp +--- a/MachO/Target.cpp +++ /dev/null @@ -1,14 +0,0 @@ -//===- Target.cpp ---------------------------------------------------------===// @@ -4912,10 +4912,10 @@ index 0f70776a507..00000000000 -using namespace lld::macho; - -TargetInfo *macho::target = nullptr; -diff --git a/lld/MachO/Target.h b/lld/MachO/Target.h +diff --git a/MachO/Target.h b/MachO/Target.h deleted file mode 100644 index 8ea1bde1230..00000000000 ---- a/lld/MachO/Target.h +--- a/MachO/Target.h +++ /dev/null @@ -1,75 +0,0 @@ -//===- Target.h -------------------------------------------------*- C++ -*-===// @@ -4993,10 +4993,10 @@ index 8ea1bde1230..00000000000 -} // namespace lld - -#endif -diff --git a/lld/MachO/Writer.cpp b/lld/MachO/Writer.cpp +diff --git a/MachO/Writer.cpp b/MachO/Writer.cpp deleted file mode 100644 index 03000a7f437..00000000000 ---- a/lld/MachO/Writer.cpp +--- a/MachO/Writer.cpp +++ /dev/null @@ -1,542 +0,0 @@ -//===- Writer.cpp ---------------------------------------------------------===// @@ -5541,10 +5541,10 @@ index 03000a7f437..00000000000 - in.stubHelper = make(); - in.imageLoaderCache = make(); -} -diff --git a/lld/MachO/Writer.h b/lld/MachO/Writer.h +diff --git a/MachO/Writer.h b/MachO/Writer.h deleted file mode 100644 index 7f846233107..00000000000 ---- a/lld/MachO/Writer.h +--- a/MachO/Writer.h +++ /dev/null @@ -1,31 +0,0 @@ -//===- Writer.h -------------------------------------------------*- C++ -*-===// @@ -5578,10 +5578,10 @@ index 7f846233107..00000000000 -} // namespace lld - -#endif -diff --git a/lld/include/lld/Common/Driver.h b/lld/include/lld/Common/Driver.h +diff --git a/include/lld/Common/Driver.h b/include/lld/Common/Driver.h index 6db3d234eb5..0a358d8aff6 100644 ---- a/lld/include/lld/Common/Driver.h -+++ b/lld/include/lld/Common/Driver.h +--- a/include/lld/Common/Driver.h ++++ b/include/lld/Common/Driver.h @@ -33,11 +33,6 @@ bool link(llvm::ArrayRef args, bool canExitEarly, llvm::raw_ostream &stdoutOS, llvm::raw_ostream &stderrOS); } @@ -5594,10 +5594,10 @@ index 6db3d234eb5..0a358d8aff6 100644 namespace wasm { bool link(llvm::ArrayRef args, bool canExitEarly, llvm::raw_ostream &stdoutOS, llvm::raw_ostream &stderrOS); -diff --git a/lld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd b/lld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd +diff --git a/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd b/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd deleted file mode 100644 index fddd192630d..00000000000 ---- a/lld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd +--- a/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd +++ /dev/null @@ -1,42 +0,0 @@ ---- !tapi-tbd-v3 @@ -5642,10 +5642,10 @@ index fddd192630d..00000000000 - - archs: [ 'x86_64' ] - symbols: [ ___nan ] -... -diff --git a/lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd b/lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd +diff --git a/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd b/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd deleted file mode 100644 index 3e62c2ee711..00000000000 ---- a/lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd +--- a/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd +++ /dev/null @@ -1,23 +0,0 @@ ---- !tapi-tbd-v3 @@ -5671,10 +5671,10 @@ index 3e62c2ee711..00000000000 - - archs: [ i386, x86_64 ] - symbols: [ _cache_create, _cache_destroy, _cache_get ] -... -diff --git a/lld/test/MachO/Inputs/libfunction.s b/lld/test/MachO/Inputs/libfunction.s +diff --git a/test/MachO/Inputs/libfunction.s b/test/MachO/Inputs/libfunction.s deleted file mode 100644 index fe0b3879a41..00000000000 ---- a/lld/test/MachO/Inputs/libfunction.s +--- a/test/MachO/Inputs/libfunction.s +++ /dev/null @@ -1,6 +0,0 @@ -.section __TEXT,__text @@ -5683,10 +5683,10 @@ index fe0b3879a41..00000000000 -_some_function: - mov $1, %rax - ret -diff --git a/lld/test/MachO/Inputs/libgoodbye.s b/lld/test/MachO/Inputs/libgoodbye.s +diff --git a/test/MachO/Inputs/libgoodbye.s b/test/MachO/Inputs/libgoodbye.s deleted file mode 100644 index 40c829cfc6e..00000000000 ---- a/lld/test/MachO/Inputs/libgoodbye.s +--- a/test/MachO/Inputs/libgoodbye.s +++ /dev/null @@ -1,14 +0,0 @@ -.section __TEXT,__cstring @@ -5703,10 +5703,10 @@ index 40c829cfc6e..00000000000 - mov $15, %rdx # length of str - syscall - ret -diff --git a/lld/test/MachO/Inputs/libhello.s b/lld/test/MachO/Inputs/libhello.s +diff --git a/test/MachO/Inputs/libhello.s b/test/MachO/Inputs/libhello.s deleted file mode 100644 index 0b9930bafcb..00000000000 ---- a/lld/test/MachO/Inputs/libhello.s +--- a/test/MachO/Inputs/libhello.s +++ /dev/null @@ -1,17 +0,0 @@ -.section __TEXT,__cstring @@ -5726,10 +5726,10 @@ index 0b9930bafcb..00000000000 - mov $13, %rdx # length of str - syscall - ret -diff --git a/lld/test/MachO/arch.s b/lld/test/MachO/arch.s +diff --git a/test/MachO/arch.s b/test/MachO/arch.s deleted file mode 100644 index a0a1962f640..00000000000 ---- a/lld/test/MachO/arch.s +--- a/test/MachO/arch.s +++ /dev/null @@ -1,11 +0,0 @@ -# REQUIRES: x86 @@ -5743,10 +5743,10 @@ index a0a1962f640..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/archive.s b/lld/test/MachO/archive.s +diff --git a/test/MachO/archive.s b/test/MachO/archive.s deleted file mode 100644 index 370980768fa..00000000000 ---- a/lld/test/MachO/archive.s +--- a/test/MachO/archive.s +++ /dev/null @@ -1,35 +0,0 @@ -# REQUIRES: x86 @@ -5784,10 +5784,10 @@ index 370980768fa..00000000000 - callq _bar - mov $0, %rax - ret -diff --git a/lld/test/MachO/bss.s b/lld/test/MachO/bss.s +diff --git a/test/MachO/bss.s b/test/MachO/bss.s deleted file mode 100644 index b56f02d2bcb..00000000000 ---- a/lld/test/MachO/bss.s +--- a/test/MachO/bss.s +++ /dev/null @@ -1,59 +0,0 @@ -# REQUIRES: x86 @@ -5849,10 +5849,10 @@ index b56f02d2bcb..00000000000 - -.data -.quad 0x1234 -diff --git a/lld/test/MachO/dylib.s b/lld/test/MachO/dylib.s +diff --git a/test/MachO/dylib.s b/test/MachO/dylib.s deleted file mode 100644 index 507a7de8742..00000000000 ---- a/lld/test/MachO/dylib.s +--- a/test/MachO/dylib.s +++ /dev/null @@ -1,35 +0,0 @@ -# REQUIRES: x86 @@ -5890,10 +5890,10 @@ index 507a7de8742..00000000000 - -_hello_world: -.asciz "Hello world!\n" -diff --git a/lld/test/MachO/dylink-lazy.s b/lld/test/MachO/dylink-lazy.s +diff --git a/test/MachO/dylink-lazy.s b/test/MachO/dylink-lazy.s deleted file mode 100644 index 16051b45bd9..00000000000 ---- a/lld/test/MachO/dylink-lazy.s +--- a/test/MachO/dylink-lazy.s +++ /dev/null @@ -1,62 +0,0 @@ -# REQUIRES: x86, shell @@ -5958,10 +5958,10 @@ index 16051b45bd9..00000000000 - callq _print_goodbye - add $8, %rsp - ret -diff --git a/lld/test/MachO/dylink.s b/lld/test/MachO/dylink.s +diff --git a/test/MachO/dylink.s b/test/MachO/dylink.s deleted file mode 100644 index 0549aab9829..00000000000 ---- a/lld/test/MachO/dylink.s +--- a/test/MachO/dylink.s +++ /dev/null @@ -1,69 +0,0 @@ -# REQUIRES: x86 @@ -6033,10 +6033,10 @@ index 0549aab9829..00000000000 -.quad _hello_world -.quad _hello_its_me + 0x8 -.quad _goodbye_world - 0xf -diff --git a/lld/test/MachO/entry-symbol.s b/lld/test/MachO/entry-symbol.s +diff --git a/test/MachO/entry-symbol.s b/test/MachO/entry-symbol.s deleted file mode 100644 index 159c7c5af04..00000000000 ---- a/lld/test/MachO/entry-symbol.s +--- a/test/MachO/entry-symbol.s +++ /dev/null @@ -1,28 +0,0 @@ -# REQUIRES: x86 @@ -6067,10 +6067,10 @@ index 159c7c5af04..00000000000 -_not_main: - movq $0, %rax - retq -diff --git a/lld/test/MachO/export-trie.s b/lld/test/MachO/export-trie.s +diff --git a/test/MachO/export-trie.s b/test/MachO/export-trie.s deleted file mode 100644 index fc1f6d110db..00000000000 ---- a/lld/test/MachO/export-trie.s +--- a/test/MachO/export-trie.s +++ /dev/null @@ -1,44 +0,0 @@ -# REQUIRES: x86 @@ -6117,10 +6117,10 @@ index fc1f6d110db..00000000000 - -_hello_its_you: -.asciz "Hello, it's you\n" -diff --git a/lld/test/MachO/fat-arch.s b/lld/test/MachO/fat-arch.s +diff --git a/test/MachO/fat-arch.s b/test/MachO/fat-arch.s deleted file mode 100644 index cb5a74b0917..00000000000 ---- a/lld/test/MachO/fat-arch.s +--- a/test/MachO/fat-arch.s +++ /dev/null @@ -1,16 +0,0 @@ -# REQUIRES: x86 @@ -6139,10 +6139,10 @@ index cb5a74b0917..00000000000 -_main: - mov $0, %eax - ret -diff --git a/lld/test/MachO/invalid/alignment-too-large.yaml b/lld/test/MachO/invalid/alignment-too-large.yaml +diff --git a/test/MachO/invalid/alignment-too-large.yaml b/test/MachO/invalid/alignment-too-large.yaml deleted file mode 100644 index 79950524bcf..00000000000 ---- a/lld/test/MachO/invalid/alignment-too-large.yaml +--- a/test/MachO/invalid/alignment-too-large.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# RUN: yaml2obj %s -o %t.o @@ -6203,10 +6203,10 @@ index 79950524bcf..00000000000 - - _main - - '' -... -diff --git a/lld/test/MachO/invalid/archive-no-index.s b/lld/test/MachO/invalid/archive-no-index.s +diff --git a/test/MachO/invalid/archive-no-index.s b/test/MachO/invalid/archive-no-index.s deleted file mode 100644 index 0f2f023e83c..00000000000 ---- a/lld/test/MachO/invalid/archive-no-index.s +--- a/test/MachO/invalid/archive-no-index.s +++ /dev/null @@ -1,17 +0,0 @@ -# REQUIRES: x86 @@ -6226,10 +6226,10 @@ index 0f2f023e83c..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/invalid/bad-archive.s b/lld/test/MachO/invalid/bad-archive.s +diff --git a/test/MachO/invalid/bad-archive.s b/test/MachO/invalid/bad-archive.s deleted file mode 100644 index 9429dc3ec31..00000000000 ---- a/lld/test/MachO/invalid/bad-archive.s +--- a/test/MachO/invalid/bad-archive.s +++ /dev/null @@ -1,11 +0,0 @@ -# REQUIRES: x86 @@ -6243,10 +6243,10 @@ index 9429dc3ec31..00000000000 -.global _main -_main: - ret -diff --git a/lld/test/MachO/invalid/duplicate-symbol.s b/lld/test/MachO/invalid/duplicate-symbol.s +diff --git a/test/MachO/invalid/duplicate-symbol.s b/test/MachO/invalid/duplicate-symbol.s deleted file mode 100644 index d08f34fc0de..00000000000 ---- a/lld/test/MachO/invalid/duplicate-symbol.s +--- a/test/MachO/invalid/duplicate-symbol.s +++ /dev/null @@ -1,12 +0,0 @@ -# REQUIRES: x86 @@ -6261,10 +6261,10 @@ index d08f34fc0de..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/invalid/invalid-executable.s b/lld/test/MachO/invalid/invalid-executable.s +diff --git a/test/MachO/invalid/invalid-executable.s b/test/MachO/invalid/invalid-executable.s deleted file mode 100644 index d8d7accf49c..00000000000 ---- a/lld/test/MachO/invalid/invalid-executable.s +--- a/test/MachO/invalid/invalid-executable.s +++ /dev/null @@ -1,11 +0,0 @@ -# REQUIRES: x86 @@ -6278,10 +6278,10 @@ index d8d7accf49c..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/invalid/invalid-fat-narch.s b/lld/test/MachO/invalid/invalid-fat-narch.s +diff --git a/test/MachO/invalid/invalid-fat-narch.s b/test/MachO/invalid/invalid-fat-narch.s deleted file mode 100644 index 2b74893bff4..00000000000 ---- a/lld/test/MachO/invalid/invalid-fat-narch.s +--- a/test/MachO/invalid/invalid-fat-narch.s +++ /dev/null @@ -1,12 +0,0 @@ -# REQUIRES: x86 @@ -6296,10 +6296,10 @@ index 2b74893bff4..00000000000 - nfat_arch: 2 -FatArchs: -Slices: -diff --git a/lld/test/MachO/invalid/invalid-fat-offset.s b/lld/test/MachO/invalid/invalid-fat-offset.s +diff --git a/test/MachO/invalid/invalid-fat-offset.s b/test/MachO/invalid/invalid-fat-offset.s deleted file mode 100644 index fed97907352..00000000000 ---- a/lld/test/MachO/invalid/invalid-fat-offset.s +--- a/test/MachO/invalid/invalid-fat-offset.s +++ /dev/null @@ -1,22 +0,0 @@ -# REQUIRES: x86 @@ -6324,10 +6324,10 @@ index fed97907352..00000000000 - size: 0 - align: 12 -Slices: -diff --git a/lld/test/MachO/invalid/invalid-relocation-length.yaml b/lld/test/MachO/invalid/invalid-relocation-length.yaml +diff --git a/test/MachO/invalid/invalid-relocation-length.yaml b/test/MachO/invalid/invalid-relocation-length.yaml deleted file mode 100644 index e256c4fb7a8..00000000000 ---- a/lld/test/MachO/invalid/invalid-relocation-length.yaml +--- a/test/MachO/invalid/invalid-relocation-length.yaml +++ /dev/null @@ -1,99 +0,0 @@ -# REQUIRES: x86 @@ -6429,10 +6429,10 @@ index e256c4fb7a8..00000000000 - - '' - - _foo - - _main -diff --git a/lld/test/MachO/invalid/invalid-relocation-pcrel.yaml b/lld/test/MachO/invalid/invalid-relocation-pcrel.yaml +diff --git a/test/MachO/invalid/invalid-relocation-pcrel.yaml b/test/MachO/invalid/invalid-relocation-pcrel.yaml deleted file mode 100644 index ed7c24ead74..00000000000 ---- a/lld/test/MachO/invalid/invalid-relocation-pcrel.yaml +--- a/test/MachO/invalid/invalid-relocation-pcrel.yaml +++ /dev/null @@ -1,99 +0,0 @@ -# REQUIRES: x86 @@ -6534,10 +6534,10 @@ index ed7c24ead74..00000000000 - - '' - - _foo - - _main -diff --git a/lld/test/MachO/invalid/missing-dylib.s b/lld/test/MachO/invalid/missing-dylib.s +diff --git a/test/MachO/invalid/missing-dylib.s b/test/MachO/invalid/missing-dylib.s deleted file mode 100644 index ad7e51130c4..00000000000 ---- a/lld/test/MachO/invalid/missing-dylib.s +--- a/test/MachO/invalid/missing-dylib.s +++ /dev/null @@ -1,5 +0,0 @@ -# REQUIRES: x86 @@ -6545,10 +6545,10 @@ index ad7e51130c4..00000000000 -# RUN: not lld -flavor darwinnew -Z -o %t -lmissing %t.o 2>&1 | FileCheck %s - -# CHECK: error: library not found for -lmissing -diff --git a/lld/test/MachO/invalid/no-id-dylink.yaml b/lld/test/MachO/invalid/no-id-dylink.yaml +diff --git a/test/MachO/invalid/no-id-dylink.yaml b/test/MachO/invalid/no-id-dylink.yaml deleted file mode 100644 index d5b0b33dcfe..00000000000 ---- a/lld/test/MachO/invalid/no-id-dylink.yaml +--- a/test/MachO/invalid/no-id-dylink.yaml +++ /dev/null @@ -1,166 +0,0 @@ -# REQUIRES: x86 @@ -6717,20 +6717,20 @@ index d5b0b33dcfe..00000000000 - - ' ' - - _hello_world - - '' -diff --git a/lld/test/MachO/invalid/no-such-file.s b/lld/test/MachO/invalid/no-such-file.s +diff --git a/test/MachO/invalid/no-such-file.s b/test/MachO/invalid/no-such-file.s deleted file mode 100644 index 0122c6105fb..00000000000 ---- a/lld/test/MachO/invalid/no-such-file.s +--- a/test/MachO/invalid/no-such-file.s +++ /dev/null @@ -1,4 +0,0 @@ -# REQUIRES: x86 -# RUN: not lld -flavor darwinnew -o /dev/null %t-no-such-file.o 2>&1 | FileCheck %s - -# CHECK: error: cannot open {{.*}}no-such-file.o -diff --git a/lld/test/MachO/invalid/order-file-bad-arch.test b/lld/test/MachO/invalid/order-file-bad-arch.test +diff --git a/test/MachO/invalid/order-file-bad-arch.test b/test/MachO/invalid/order-file-bad-arch.test deleted file mode 100644 index 84fe6963d24..00000000000 ---- a/lld/test/MachO/invalid/order-file-bad-arch.test +--- a/test/MachO/invalid/order-file-bad-arch.test +++ /dev/null @@ -1,9 +0,0 @@ -# REQUIRES: x86 @@ -6742,10 +6742,10 @@ index 84fe6963d24..00000000000 -_barsymbol -sparc:hello.o:_foosymbol -i386:hello.o:_foosymbol -diff --git a/lld/test/MachO/invalid/order-file-bad-objfile.test b/lld/test/MachO/invalid/order-file-bad-objfile.test +diff --git a/test/MachO/invalid/order-file-bad-objfile.test b/test/MachO/invalid/order-file-bad-objfile.test deleted file mode 100644 index 19e9404da42..00000000000 ---- a/lld/test/MachO/invalid/order-file-bad-objfile.test +--- a/test/MachO/invalid/order-file-bad-objfile.test +++ /dev/null @@ -1,10 +0,0 @@ -# REQUIRES: x86 @@ -6758,10 +6758,10 @@ index 19e9404da42..00000000000 -_barsymbol -x86_64:helloo:_foosymbol -z80:_foosymbol -diff --git a/lld/test/MachO/invalid/reserved-section-name.s b/lld/test/MachO/invalid/reserved-section-name.s +diff --git a/test/MachO/invalid/reserved-section-name.s b/test/MachO/invalid/reserved-section-name.s deleted file mode 100644 index 8d767bcf292..00000000000 ---- a/lld/test/MachO/invalid/reserved-section-name.s +--- a/test/MachO/invalid/reserved-section-name.s +++ /dev/null @@ -1,14 +0,0 @@ -# REQUIRES: x86 @@ -6778,10 +6778,10 @@ index 8d767bcf292..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/invalid/stub-link.s b/lld/test/MachO/invalid/stub-link.s +diff --git a/test/MachO/invalid/stub-link.s b/test/MachO/invalid/stub-link.s deleted file mode 100644 index f1c15903702..00000000000 ---- a/lld/test/MachO/invalid/stub-link.s +--- a/test/MachO/invalid/stub-link.s +++ /dev/null @@ -1,15 +0,0 @@ -# REQUIRES: x86 @@ -6799,10 +6799,10 @@ index f1c15903702..00000000000 -_main: - movq __cache_handle_memory_pressure_event@GOTPCREL(%rip), %rax - ret -diff --git a/lld/test/MachO/invalid/undefined-symbol.s b/lld/test/MachO/invalid/undefined-symbol.s +diff --git a/test/MachO/invalid/undefined-symbol.s b/test/MachO/invalid/undefined-symbol.s deleted file mode 100644 index 88eabfd1ce0..00000000000 ---- a/lld/test/MachO/invalid/undefined-symbol.s +--- a/test/MachO/invalid/undefined-symbol.s +++ /dev/null @@ -1,11 +0,0 @@ -# REQUIRES: x86 @@ -6816,10 +6816,10 @@ index 88eabfd1ce0..00000000000 - callq _foo - movq $0, %rax - retq -diff --git a/lld/test/MachO/link-search-order.s b/lld/test/MachO/link-search-order.s +diff --git a/test/MachO/link-search-order.s b/test/MachO/link-search-order.s deleted file mode 100644 index 9819e171c7d..00000000000 ---- a/lld/test/MachO/link-search-order.s +--- a/test/MachO/link-search-order.s +++ /dev/null @@ -1,43 +0,0 @@ -# REQUIRES: x86 @@ -6865,10 +6865,10 @@ index 9819e171c7d..00000000000 - syscall - mov $0, %rax - ret -diff --git a/lld/test/MachO/load-commands.s b/lld/test/MachO/load-commands.s +diff --git a/test/MachO/load-commands.s b/test/MachO/load-commands.s deleted file mode 100644 index c9f5d9b5c21..00000000000 ---- a/lld/test/MachO/load-commands.s +--- a/test/MachO/load-commands.s +++ /dev/null @@ -1,22 +0,0 @@ -# REQUIRES: x86 @@ -6893,10 +6893,10 @@ index c9f5d9b5c21..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/local-got.s b/lld/test/MachO/local-got.s +diff --git a/test/MachO/local-got.s b/test/MachO/local-got.s deleted file mode 100644 index 6099a6bf18c..00000000000 ---- a/lld/test/MachO/local-got.s +--- a/test/MachO/local-got.s +++ /dev/null @@ -1,58 +0,0 @@ -# REQUIRES: x86 @@ -6957,10 +6957,10 @@ index 6099a6bf18c..00000000000 - -_goodbye_world: - .asciz "Goodbye world!\n" -diff --git a/lld/test/MachO/no-exports-dylib.s b/lld/test/MachO/no-exports-dylib.s +diff --git a/test/MachO/no-exports-dylib.s b/test/MachO/no-exports-dylib.s deleted file mode 100644 index 896c31ef3c2..00000000000 ---- a/lld/test/MachO/no-exports-dylib.s +--- a/test/MachO/no-exports-dylib.s +++ /dev/null @@ -1,6 +0,0 @@ -# REQUIRES: x86 @@ -6969,10 +6969,10 @@ index 896c31ef3c2..00000000000 - -# RUN: obj2yaml %t.dylib | FileCheck %s -# CHECK: export_size: 0 -diff --git a/lld/test/MachO/order-file.s b/lld/test/MachO/order-file.s +diff --git a/test/MachO/order-file.s b/test/MachO/order-file.s deleted file mode 100644 index 4ced92a4eca..00000000000 ---- a/lld/test/MachO/order-file.s +--- a/test/MachO/order-file.s +++ /dev/null @@ -1,131 +0,0 @@ -# REQUIRES: x86 @@ -7106,10 +7106,10 @@ index 4ced92a4eca..00000000000 -_main: - callq _foo - ret -diff --git a/lld/test/MachO/platform-version.test b/lld/test/MachO/platform-version.test +diff --git a/test/MachO/platform-version.test b/test/MachO/platform-version.test deleted file mode 100644 index baa4ced08fb..00000000000 ---- a/lld/test/MachO/platform-version.test +--- a/test/MachO/platform-version.test +++ /dev/null @@ -1,17 +0,0 @@ -# RUN: not lld -flavor darwinnew -platform_version 2>&1 \ @@ -7129,10 +7129,10 @@ index baa4ced08fb..00000000000 -FAIL: usage: -platform_version platform min_version sdk_version -GOOD: undefined symbol: _main -FAIL_FILE: cannot open foobar -diff --git a/lld/test/MachO/relocations.s b/lld/test/MachO/relocations.s +diff --git a/test/MachO/relocations.s b/test/MachO/relocations.s deleted file mode 100644 index edaa3089356..00000000000 ---- a/lld/test/MachO/relocations.s +--- a/test/MachO/relocations.s +++ /dev/null @@ -1,66 +0,0 @@ -# REQUIRES: x86 @@ -7201,10 +7201,10 @@ index edaa3089356..00000000000 - .quad L_.str -L_.ptr_2_to_str: - .quad L_.str -diff --git a/lld/test/MachO/resolution.s b/lld/test/MachO/resolution.s +diff --git a/test/MachO/resolution.s b/test/MachO/resolution.s deleted file mode 100644 index a13bb529cf7..00000000000 ---- a/lld/test/MachO/resolution.s +--- a/test/MachO/resolution.s +++ /dev/null @@ -1,44 +0,0 @@ -# REQUIRES: x86 @@ -7251,10 +7251,10 @@ index a13bb529cf7..00000000000 - movq _bar@GOTPCREL(%rip), %rsi - movq _baz@GOTPCREL(%rip), %rsi - ret -diff --git a/lld/test/MachO/search-paths-darwin.test b/lld/test/MachO/search-paths-darwin.test +diff --git a/test/MachO/search-paths-darwin.test b/test/MachO/search-paths-darwin.test deleted file mode 100644 index 85b7e30671b..00000000000 ---- a/lld/test/MachO/search-paths-darwin.test +--- a/test/MachO/search-paths-darwin.test +++ /dev/null @@ -1,20 +0,0 @@ -REQUIRES: x86 @@ -7277,10 +7277,10 @@ index 85b7e30671b..00000000000 -CHECK_Z-NEXT: [[LDIR]] -CHECK_Z-NEXT: Framework search paths: -CHECK_Z-NEXT: [[FDIR]] -diff --git a/lld/test/MachO/search-paths.test b/lld/test/MachO/search-paths.test +diff --git a/test/MachO/search-paths.test b/test/MachO/search-paths.test deleted file mode 100644 index 124a2a080b6..00000000000 ---- a/lld/test/MachO/search-paths.test +--- a/test/MachO/search-paths.test +++ /dev/null @@ -1,15 +0,0 @@ -UNSUPPORTED: darwin @@ -7298,10 +7298,10 @@ index 124a2a080b6..00000000000 -CHECK_Z-NEXT: [[LDIR]] -CHECK_Z-NEXT: Framework search paths: -CHECK_Z-NEXT: [[FDIR]] -diff --git a/lld/test/MachO/section-headers.s b/lld/test/MachO/section-headers.s +diff --git a/test/MachO/section-headers.s b/test/MachO/section-headers.s deleted file mode 100644 index 9fafc5a912b..00000000000 ---- a/lld/test/MachO/section-headers.s +--- a/test/MachO/section-headers.s +++ /dev/null @@ -1,46 +0,0 @@ -# REQUIRES: x86 @@ -7350,10 +7350,10 @@ index 9fafc5a912b..00000000000 - -.section __TEXT,maxlen_16ch_name -.align 3 -diff --git a/lld/test/MachO/section-merge.s b/lld/test/MachO/section-merge.s +diff --git a/test/MachO/section-merge.s b/test/MachO/section-merge.s deleted file mode 100644 index 69c55a047b4..00000000000 ---- a/lld/test/MachO/section-merge.s +--- a/test/MachO/section-merge.s +++ /dev/null @@ -1,26 +0,0 @@ -# REQUIRES: x86 @@ -7382,10 +7382,10 @@ index 69c55a047b4..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/test/MachO/segments.s b/lld/test/MachO/segments.s +diff --git a/test/MachO/segments.s b/test/MachO/segments.s deleted file mode 100644 index acb0f1e9010..00000000000 ---- a/lld/test/MachO/segments.s +--- a/test/MachO/segments.s +++ /dev/null @@ -1,53 +0,0 @@ -# REQUIRES: x86 @@ -7441,10 +7441,10 @@ index acb0f1e9010..00000000000 - ret - -.section maxlen_16ch_name,foo -diff --git a/lld/test/MachO/silent-ignore.test b/lld/test/MachO/silent-ignore.test +diff --git a/test/MachO/silent-ignore.test b/test/MachO/silent-ignore.test deleted file mode 100644 index ae68dd8fe81..00000000000 ---- a/lld/test/MachO/silent-ignore.test +--- a/test/MachO/silent-ignore.test +++ /dev/null @@ -1,9 +0,0 @@ -RUN: lld -flavor darwinnew -v \ @@ -7456,10 +7456,10 @@ index ae68dd8fe81..00000000000 -RUN: -syslibroot /path/to/MacOSX.platform/Developer/SDKs/MacOSX.sdk -RUN: not lld -flavor darwinnew -v --not-an-ignored-argument 2>&1 | FileCheck %s -CHECK: error: unknown argument: --not-an-ignored-argument -diff --git a/lld/test/MachO/static-link.s b/lld/test/MachO/static-link.s +diff --git a/test/MachO/static-link.s b/test/MachO/static-link.s deleted file mode 100644 index f8260807df6..00000000000 ---- a/lld/test/MachO/static-link.s +--- a/test/MachO/static-link.s +++ /dev/null @@ -1,30 +0,0 @@ -# REQUIRES: x86 @@ -7492,10 +7492,10 @@ index f8260807df6..00000000000 - syscall - mov $0, %rax - ret -diff --git a/lld/test/MachO/stub-link.s b/lld/test/MachO/stub-link.s +diff --git a/test/MachO/stub-link.s b/test/MachO/stub-link.s deleted file mode 100644 index 1bf65c46a78..00000000000 ---- a/lld/test/MachO/stub-link.s +--- a/test/MachO/stub-link.s +++ /dev/null @@ -1,21 +0,0 @@ -# REQUIRES: x86 @@ -7519,10 +7519,10 @@ index 1bf65c46a78..00000000000 -_main: - movq ___nan@GOTPCREL(%rip), %rax - ret -diff --git a/lld/test/MachO/sub-library.s b/lld/test/MachO/sub-library.s +diff --git a/test/MachO/sub-library.s b/test/MachO/sub-library.s deleted file mode 100644 index e858eaf0bff..00000000000 ---- a/lld/test/MachO/sub-library.s +--- a/test/MachO/sub-library.s +++ /dev/null @@ -1,74 +0,0 @@ -# REQUIRES: x86 @@ -7599,10 +7599,10 @@ index e858eaf0bff..00000000000 - syscall - mov $0, %rax - ret -diff --git a/lld/test/MachO/subsections-section-relocs.s b/lld/test/MachO/subsections-section-relocs.s +diff --git a/test/MachO/subsections-section-relocs.s b/test/MachO/subsections-section-relocs.s deleted file mode 100644 index e8a8d7a3ec4..00000000000 ---- a/lld/test/MachO/subsections-section-relocs.s +--- a/test/MachO/subsections-section-relocs.s +++ /dev/null @@ -1,47 +0,0 @@ -# REQUIRES: x86 @@ -7652,10 +7652,10 @@ index e8a8d7a3ec4..00000000000 - .asciz "Private symbol" - -.subsections_via_symbols -diff --git a/lld/test/MachO/subsections-symbol-relocs.s b/lld/test/MachO/subsections-symbol-relocs.s +diff --git a/test/MachO/subsections-symbol-relocs.s b/test/MachO/subsections-symbol-relocs.s deleted file mode 100644 index 475c909377d..00000000000 ---- a/lld/test/MachO/subsections-symbol-relocs.s +--- a/test/MachO/subsections-symbol-relocs.s +++ /dev/null @@ -1,55 +0,0 @@ -# REQUIRES: x86 @@ -7713,10 +7713,10 @@ index 475c909377d..00000000000 - retq - -.subsections_via_symbols -diff --git a/lld/test/MachO/symbol-order.s b/lld/test/MachO/symbol-order.s +diff --git a/test/MachO/symbol-order.s b/test/MachO/symbol-order.s deleted file mode 100644 index 328ff9e2475..00000000000 ---- a/lld/test/MachO/symbol-order.s +--- a/test/MachO/symbol-order.s +++ /dev/null @@ -1,46 +0,0 @@ -# REQUIRES: x86 @@ -7765,10 +7765,10 @@ index 328ff9e2475..00000000000 -_main: - callq g - ret -diff --git a/lld/test/MachO/symtab.s b/lld/test/MachO/symtab.s +diff --git a/test/MachO/symtab.s b/test/MachO/symtab.s deleted file mode 100644 index 44a016912bd..00000000000 ---- a/lld/test/MachO/symtab.s +--- a/test/MachO/symtab.s +++ /dev/null @@ -1,54 +0,0 @@ -# REQUIRES: x86 @@ -7825,10 +7825,10 @@ index 44a016912bd..00000000000 -bar: - mov $2, %rax - ret -diff --git a/lld/test/MachO/x86-64-reloc-signed.s b/lld/test/MachO/x86-64-reloc-signed.s +diff --git a/test/MachO/x86-64-reloc-signed.s b/test/MachO/x86-64-reloc-signed.s deleted file mode 100644 index 568f65c7c1e..00000000000 ---- a/lld/test/MachO/x86-64-reloc-signed.s +--- a/test/MachO/x86-64-reloc-signed.s +++ /dev/null @@ -1,64 +0,0 @@ -# REQUIRES: x86 @@ -7895,10 +7895,10 @@ index 568f65c7c1e..00000000000 -.section __DATA,__foo -L._s: - .space 5 -diff --git a/lld/test/MachO/x86-64-reloc-unsigned.s b/lld/test/MachO/x86-64-reloc-unsigned.s +diff --git a/test/MachO/x86-64-reloc-unsigned.s b/test/MachO/x86-64-reloc-unsigned.s deleted file mode 100644 index 52a3d536139..00000000000 ---- a/lld/test/MachO/x86-64-reloc-unsigned.s +--- a/test/MachO/x86-64-reloc-unsigned.s +++ /dev/null @@ -1,31 +0,0 @@ -# REQUIRES: x86 @@ -7932,10 +7932,10 @@ index 52a3d536139..00000000000 -_main: - mov $0, %rax - ret -diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt +diff --git a/tools/lld/CMakeLists.txt b/tools/lld/CMakeLists.txt index e6f72fcd348..ca589942712 100644 ---- a/lld/tools/lld/CMakeLists.txt -+++ b/lld/tools/lld/CMakeLists.txt +--- a/tools/lld/CMakeLists.txt ++++ b/tools/lld/CMakeLists.txt @@ -15,7 +15,6 @@ target_link_libraries(lld lldCOFF lldDriver @@ -7944,10 +7944,10 @@ index e6f72fcd348..ca589942712 100644 lldMinGW lldWasm ) -diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp +diff --git a/tools/lld/lld.cpp b/tools/lld/lld.cpp index 8a8f8d04bbd..1063e80b8a8 100644 ---- a/lld/tools/lld/lld.cpp -+++ b/lld/tools/lld/lld.cpp +--- a/tools/lld/lld.cpp ++++ b/tools/lld/lld.cpp @@ -45,11 +45,10 @@ using namespace llvm::sys; enum Flavor { diff --git a/include-libunwind-header.patch b/include-libunwind-header.patch new file mode 100644 index 0000000..ac012f0 --- /dev/null +++ b/include-libunwind-header.patch @@ -0,0 +1,481 @@ +diff -Naur lld-12.0.0rc1.src.orig/include/mach-o/compact_unwind_encoding.h lld-12.0.0rc1.src/include/mach-o/compact_unwind_encoding.h +--- lld-12.0.0rc1.src.orig/include/mach-o/compact_unwind_encoding.h 1970-01-01 01:00:00.000000000 +0100 ++++ lld-12.0.0rc1.src/include/mach-o/compact_unwind_encoding.h 2021-02-16 19:55:22.000000000 +0100 +@@ -0,0 +1,477 @@ ++//===------------------ mach-o/compact_unwind_encoding.h ------------------===// ++// ++// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. ++// See https://llvm.org/LICENSE.txt for license information. ++// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ++// ++// ++// Darwin's alternative to DWARF based unwind encodings. ++// ++//===----------------------------------------------------------------------===// ++ ++ ++#ifndef __COMPACT_UNWIND_ENCODING__ ++#define __COMPACT_UNWIND_ENCODING__ ++ ++#include ++ ++// ++// Compilers can emit standard DWARF FDEs in the __TEXT,__eh_frame section ++// of object files. Or compilers can emit compact unwind information in ++// the __LD,__compact_unwind section. ++// ++// When the linker creates a final linked image, it will create a ++// __TEXT,__unwind_info section. This section is a small and fast way for the ++// runtime to access unwind info for any given function. If the compiler ++// emitted compact unwind info for the function, that compact unwind info will ++// be encoded in the __TEXT,__unwind_info section. If the compiler emitted ++// DWARF unwind info, the __TEXT,__unwind_info section will contain the offset ++// of the FDE in the __TEXT,__eh_frame section in the final linked image. ++// ++// Note: Previously, the linker would transform some DWARF unwind infos into ++// compact unwind info. But that is fragile and no longer done. ++ ++ ++// ++// The compact unwind endoding is a 32-bit value which encoded in an ++// architecture specific way, which registers to restore from where, and how ++// to unwind out of the function. ++// ++typedef uint32_t compact_unwind_encoding_t; ++ ++ ++// architecture independent bits ++enum { ++ UNWIND_IS_NOT_FUNCTION_START = 0x80000000, ++ UNWIND_HAS_LSDA = 0x40000000, ++ UNWIND_PERSONALITY_MASK = 0x30000000, ++}; ++ ++ ++ ++ ++// ++// x86 ++// ++// 1-bit: start ++// 1-bit: has lsda ++// 2-bit: personality index ++// ++// 4-bits: 0=old, 1=ebp based, 2=stack-imm, 3=stack-ind, 4=DWARF ++// ebp based: ++// 15-bits (5*3-bits per reg) register permutation ++// 8-bits for stack offset ++// frameless: ++// 8-bits stack size ++// 3-bits stack adjust ++// 3-bits register count ++// 10-bits register permutation ++// ++enum { ++ UNWIND_X86_MODE_MASK = 0x0F000000, ++ UNWIND_X86_MODE_EBP_FRAME = 0x01000000, ++ UNWIND_X86_MODE_STACK_IMMD = 0x02000000, ++ UNWIND_X86_MODE_STACK_IND = 0x03000000, ++ UNWIND_X86_MODE_DWARF = 0x04000000, ++ ++ UNWIND_X86_EBP_FRAME_REGISTERS = 0x00007FFF, ++ UNWIND_X86_EBP_FRAME_OFFSET = 0x00FF0000, ++ ++ UNWIND_X86_FRAMELESS_STACK_SIZE = 0x00FF0000, ++ UNWIND_X86_FRAMELESS_STACK_ADJUST = 0x0000E000, ++ UNWIND_X86_FRAMELESS_STACK_REG_COUNT = 0x00001C00, ++ UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, ++ ++ UNWIND_X86_DWARF_SECTION_OFFSET = 0x00FFFFFF, ++}; ++ ++enum { ++ UNWIND_X86_REG_NONE = 0, ++ UNWIND_X86_REG_EBX = 1, ++ UNWIND_X86_REG_ECX = 2, ++ UNWIND_X86_REG_EDX = 3, ++ UNWIND_X86_REG_EDI = 4, ++ UNWIND_X86_REG_ESI = 5, ++ UNWIND_X86_REG_EBP = 6, ++}; ++ ++// ++// For x86 there are four modes for the compact unwind encoding: ++// UNWIND_X86_MODE_EBP_FRAME: ++// EBP based frame where EBP is push on stack immediately after return address, ++// then ESP is moved to EBP. Thus, to unwind ESP is restored with the current ++// EPB value, then EBP is restored by popping off the stack, and the return ++// is done by popping the stack once more into the pc. ++// All non-volatile registers that need to be restored must have been saved ++// in a small range in the stack that starts EBP-4 to EBP-1020. The offset/4 ++// is encoded in the UNWIND_X86_EBP_FRAME_OFFSET bits. The registers saved ++// are encoded in the UNWIND_X86_EBP_FRAME_REGISTERS bits as five 3-bit entries. ++// Each entry contains which register to restore. ++// UNWIND_X86_MODE_STACK_IMMD: ++// A "frameless" (EBP not used as frame pointer) function with a small ++// constant stack size. To return, a constant (encoded in the compact ++// unwind encoding) is added to the ESP. Then the return is done by ++// popping the stack into the pc. ++// All non-volatile registers that need to be restored must have been saved ++// on the stack immediately after the return address. The stack_size/4 is ++// encoded in the UNWIND_X86_FRAMELESS_STACK_SIZE (max stack size is 1024). ++// The number of registers saved is encoded in UNWIND_X86_FRAMELESS_STACK_REG_COUNT. ++// UNWIND_X86_FRAMELESS_STACK_REG_PERMUTATION constains which registers were ++// saved and their order. ++// UNWIND_X86_MODE_STACK_IND: ++// A "frameless" (EBP not used as frame pointer) function large constant ++// stack size. This case is like the previous, except the stack size is too ++// large to encode in the compact unwind encoding. Instead it requires that ++// the function contains "subl $nnnnnnnn,ESP" in its prolog. The compact ++// encoding contains the offset to the nnnnnnnn value in the function in ++// UNWIND_X86_FRAMELESS_STACK_SIZE. ++// UNWIND_X86_MODE_DWARF: ++// No compact unwind encoding is available. Instead the low 24-bits of the ++// compact encoding is the offset of the DWARF FDE in the __eh_frame section. ++// This mode is never used in object files. It is only generated by the ++// linker in final linked images which have only DWARF unwind info for a ++// function. ++// ++// The permutation encoding is a Lehmer code sequence encoded into a ++// single variable-base number so we can encode the ordering of up to ++// six registers in a 10-bit space. ++// ++// The following is the algorithm used to create the permutation encoding used ++// with frameless stacks. It is passed the number of registers to be saved and ++// an array of the register numbers saved. ++// ++//uint32_t permute_encode(uint32_t registerCount, const uint32_t registers[6]) ++//{ ++// uint32_t renumregs[6]; ++// for (int i=6-registerCount; i < 6; ++i) { ++// int countless = 0; ++// for (int j=6-registerCount; j < i; ++j) { ++// if ( registers[j] < registers[i] ) ++// ++countless; ++// } ++// renumregs[i] = registers[i] - countless -1; ++// } ++// uint32_t permutationEncoding = 0; ++// switch ( registerCount ) { ++// case 6: ++// permutationEncoding |= (120*renumregs[0] + 24*renumregs[1] ++// + 6*renumregs[2] + 2*renumregs[3] ++// + renumregs[4]); ++// break; ++// case 5: ++// permutationEncoding |= (120*renumregs[1] + 24*renumregs[2] ++// + 6*renumregs[3] + 2*renumregs[4] ++// + renumregs[5]); ++// break; ++// case 4: ++// permutationEncoding |= (60*renumregs[2] + 12*renumregs[3] ++// + 3*renumregs[4] + renumregs[5]); ++// break; ++// case 3: ++// permutationEncoding |= (20*renumregs[3] + 4*renumregs[4] ++// + renumregs[5]); ++// break; ++// case 2: ++// permutationEncoding |= (5*renumregs[4] + renumregs[5]); ++// break; ++// case 1: ++// permutationEncoding |= (renumregs[5]); ++// break; ++// } ++// return permutationEncoding; ++//} ++// ++ ++ ++ ++ ++// ++// x86_64 ++// ++// 1-bit: start ++// 1-bit: has lsda ++// 2-bit: personality index ++// ++// 4-bits: 0=old, 1=rbp based, 2=stack-imm, 3=stack-ind, 4=DWARF ++// rbp based: ++// 15-bits (5*3-bits per reg) register permutation ++// 8-bits for stack offset ++// frameless: ++// 8-bits stack size ++// 3-bits stack adjust ++// 3-bits register count ++// 10-bits register permutation ++// ++enum { ++ UNWIND_X86_64_MODE_MASK = 0x0F000000, ++ UNWIND_X86_64_MODE_RBP_FRAME = 0x01000000, ++ UNWIND_X86_64_MODE_STACK_IMMD = 0x02000000, ++ UNWIND_X86_64_MODE_STACK_IND = 0x03000000, ++ UNWIND_X86_64_MODE_DWARF = 0x04000000, ++ ++ UNWIND_X86_64_RBP_FRAME_REGISTERS = 0x00007FFF, ++ UNWIND_X86_64_RBP_FRAME_OFFSET = 0x00FF0000, ++ ++ UNWIND_X86_64_FRAMELESS_STACK_SIZE = 0x00FF0000, ++ UNWIND_X86_64_FRAMELESS_STACK_ADJUST = 0x0000E000, ++ UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT = 0x00001C00, ++ UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION = 0x000003FF, ++ ++ UNWIND_X86_64_DWARF_SECTION_OFFSET = 0x00FFFFFF, ++}; ++ ++enum { ++ UNWIND_X86_64_REG_NONE = 0, ++ UNWIND_X86_64_REG_RBX = 1, ++ UNWIND_X86_64_REG_R12 = 2, ++ UNWIND_X86_64_REG_R13 = 3, ++ UNWIND_X86_64_REG_R14 = 4, ++ UNWIND_X86_64_REG_R15 = 5, ++ UNWIND_X86_64_REG_RBP = 6, ++}; ++// ++// For x86_64 there are four modes for the compact unwind encoding: ++// UNWIND_X86_64_MODE_RBP_FRAME: ++// RBP based frame where RBP is push on stack immediately after return address, ++// then RSP is moved to RBP. Thus, to unwind RSP is restored with the current ++// EPB value, then RBP is restored by popping off the stack, and the return ++// is done by popping the stack once more into the pc. ++// All non-volatile registers that need to be restored must have been saved ++// in a small range in the stack that starts RBP-8 to RBP-2040. The offset/8 ++// is encoded in the UNWIND_X86_64_RBP_FRAME_OFFSET bits. The registers saved ++// are encoded in the UNWIND_X86_64_RBP_FRAME_REGISTERS bits as five 3-bit entries. ++// Each entry contains which register to restore. ++// UNWIND_X86_64_MODE_STACK_IMMD: ++// A "frameless" (RBP not used as frame pointer) function with a small ++// constant stack size. To return, a constant (encoded in the compact ++// unwind encoding) is added to the RSP. Then the return is done by ++// popping the stack into the pc. ++// All non-volatile registers that need to be restored must have been saved ++// on the stack immediately after the return address. The stack_size/8 is ++// encoded in the UNWIND_X86_64_FRAMELESS_STACK_SIZE (max stack size is 2048). ++// The number of registers saved is encoded in UNWIND_X86_64_FRAMELESS_STACK_REG_COUNT. ++// UNWIND_X86_64_FRAMELESS_STACK_REG_PERMUTATION constains which registers were ++// saved and their order. ++// UNWIND_X86_64_MODE_STACK_IND: ++// A "frameless" (RBP not used as frame pointer) function large constant ++// stack size. This case is like the previous, except the stack size is too ++// large to encode in the compact unwind encoding. Instead it requires that ++// the function contains "subq $nnnnnnnn,RSP" in its prolog. The compact ++// encoding contains the offset to the nnnnnnnn value in the function in ++// UNWIND_X86_64_FRAMELESS_STACK_SIZE. ++// UNWIND_X86_64_MODE_DWARF: ++// No compact unwind encoding is available. Instead the low 24-bits of the ++// compact encoding is the offset of the DWARF FDE in the __eh_frame section. ++// This mode is never used in object files. It is only generated by the ++// linker in final linked images which have only DWARF unwind info for a ++// function. ++// ++ ++ ++// ARM64 ++// ++// 1-bit: start ++// 1-bit: has lsda ++// 2-bit: personality index ++// ++// 4-bits: 4=frame-based, 3=DWARF, 2=frameless ++// frameless: ++// 12-bits of stack size ++// frame-based: ++// 4-bits D reg pairs saved ++// 5-bits X reg pairs saved ++// DWARF: ++// 24-bits offset of DWARF FDE in __eh_frame section ++// ++enum { ++ UNWIND_ARM64_MODE_MASK = 0x0F000000, ++ UNWIND_ARM64_MODE_FRAMELESS = 0x02000000, ++ UNWIND_ARM64_MODE_DWARF = 0x03000000, ++ UNWIND_ARM64_MODE_FRAME = 0x04000000, ++ ++ UNWIND_ARM64_FRAME_X19_X20_PAIR = 0x00000001, ++ UNWIND_ARM64_FRAME_X21_X22_PAIR = 0x00000002, ++ UNWIND_ARM64_FRAME_X23_X24_PAIR = 0x00000004, ++ UNWIND_ARM64_FRAME_X25_X26_PAIR = 0x00000008, ++ UNWIND_ARM64_FRAME_X27_X28_PAIR = 0x00000010, ++ UNWIND_ARM64_FRAME_D8_D9_PAIR = 0x00000100, ++ UNWIND_ARM64_FRAME_D10_D11_PAIR = 0x00000200, ++ UNWIND_ARM64_FRAME_D12_D13_PAIR = 0x00000400, ++ UNWIND_ARM64_FRAME_D14_D15_PAIR = 0x00000800, ++ ++ UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK = 0x00FFF000, ++ UNWIND_ARM64_DWARF_SECTION_OFFSET = 0x00FFFFFF, ++}; ++// For arm64 there are three modes for the compact unwind encoding: ++// UNWIND_ARM64_MODE_FRAME: ++// This is a standard arm64 prolog where FP/LR are immediately pushed on the ++// stack, then SP is copied to FP. If there are any non-volatile registers ++// saved, then are copied into the stack frame in pairs in a contiguous ++// range right below the saved FP/LR pair. Any subset of the five X pairs ++// and four D pairs can be saved, but the memory layout must be in register ++// number order. ++// UNWIND_ARM64_MODE_FRAMELESS: ++// A "frameless" leaf function, where FP/LR are not saved. The return address ++// remains in LR throughout the function. If any non-volatile registers ++// are saved, they must be pushed onto the stack before any stack space is ++// allocated for local variables. The stack sized (including any saved ++// non-volatile registers) divided by 16 is encoded in the bits ++// UNWIND_ARM64_FRAMELESS_STACK_SIZE_MASK. ++// UNWIND_ARM64_MODE_DWARF: ++// No compact unwind encoding is available. Instead the low 24-bits of the ++// compact encoding is the offset of the DWARF FDE in the __eh_frame section. ++// This mode is never used in object files. It is only generated by the ++// linker in final linked images which have only DWARF unwind info for a ++// function. ++// ++ ++ ++ ++ ++ ++//////////////////////////////////////////////////////////////////////////////// ++// ++// Relocatable Object Files: __LD,__compact_unwind ++// ++//////////////////////////////////////////////////////////////////////////////// ++ ++// ++// A compiler can generated compact unwind information for a function by adding ++// a "row" to the __LD,__compact_unwind section. This section has the ++// S_ATTR_DEBUG bit set, so the section will be ignored by older linkers. ++// It is removed by the new linker, so never ends up in final executables. ++// This section is a table, initially with one row per function (that needs ++// unwind info). The table columns and some conceptual entries are: ++// ++// range-start pointer to start of function/range ++// range-length ++// compact-unwind-encoding 32-bit encoding ++// personality-function or zero if no personality function ++// lsda or zero if no LSDA data ++// ++// The length and encoding fields are 32-bits. The other are all pointer sized. ++// ++// In x86_64 assembly, these entry would look like: ++// ++// .section __LD,__compact_unwind,regular,debug ++// ++// #compact unwind for _foo ++// .quad _foo ++// .set L1,LfooEnd-_foo ++// .long L1 ++// .long 0x01010001 ++// .quad 0 ++// .quad 0 ++// ++// #compact unwind for _bar ++// .quad _bar ++// .set L2,LbarEnd-_bar ++// .long L2 ++// .long 0x01020011 ++// .quad __gxx_personality ++// .quad except_tab1 ++// ++// ++// Notes: There is no need for any labels in the the __compact_unwind section. ++// The use of the .set directive is to force the evaluation of the ++// range-length at assembly time, instead of generating relocations. ++// ++// To support future compiler optimizations where which non-volatile registers ++// are saved changes within a function (e.g. delay saving non-volatiles until ++// necessary), there can by multiple lines in the __compact_unwind table for one ++// function, each with a different (non-overlapping) range and each with ++// different compact unwind encodings that correspond to the non-volatiles ++// saved at that range of the function. ++// ++// If a particular function is so wacky that there is no compact unwind way ++// to encode it, then the compiler can emit traditional DWARF unwind info. ++// The runtime will use which ever is available. ++// ++// Runtime support for compact unwind encodings are only available on 10.6 ++// and later. So, the compiler should not generate it when targeting pre-10.6. ++ ++ ++ ++ ++//////////////////////////////////////////////////////////////////////////////// ++// ++// Final Linked Images: __TEXT,__unwind_info ++// ++//////////////////////////////////////////////////////////////////////////////// ++ ++// ++// The __TEXT,__unwind_info section is laid out for an efficient two level lookup. ++// The header of the section contains a coarse index that maps function address ++// to the page (4096 byte block) containing the unwind info for that function. ++// ++ ++#define UNWIND_SECTION_VERSION 1 ++struct unwind_info_section_header ++{ ++ uint32_t version; // UNWIND_SECTION_VERSION ++ uint32_t commonEncodingsArraySectionOffset; ++ uint32_t commonEncodingsArrayCount; ++ uint32_t personalityArraySectionOffset; ++ uint32_t personalityArrayCount; ++ uint32_t indexSectionOffset; ++ uint32_t indexCount; ++ // compact_unwind_encoding_t[] ++ // uint32_t personalities[] ++ // unwind_info_section_header_index_entry[] ++ // unwind_info_section_header_lsda_index_entry[] ++}; ++ ++struct unwind_info_section_header_index_entry ++{ ++ uint32_t functionOffset; ++ uint32_t secondLevelPagesSectionOffset; // section offset to start of regular or compress page ++ uint32_t lsdaIndexArraySectionOffset; // section offset to start of lsda_index array for this range ++}; ++ ++struct unwind_info_section_header_lsda_index_entry ++{ ++ uint32_t functionOffset; ++ uint32_t lsdaOffset; ++}; ++ ++// ++// There are two kinds of second level index pages: regular and compressed. ++// A compressed page can hold up to 1021 entries, but it cannot be used ++// if too many different encoding types are used. The regular page holds ++// 511 entries. ++// ++ ++struct unwind_info_regular_second_level_entry ++{ ++ uint32_t functionOffset; ++ compact_unwind_encoding_t encoding; ++}; ++ ++#define UNWIND_SECOND_LEVEL_REGULAR 2 ++struct unwind_info_regular_second_level_page_header ++{ ++ uint32_t kind; // UNWIND_SECOND_LEVEL_REGULAR ++ uint16_t entryPageOffset; ++ uint16_t entryCount; ++ // entry array ++}; ++ ++#define UNWIND_SECOND_LEVEL_COMPRESSED 3 ++struct unwind_info_compressed_second_level_page_header ++{ ++ uint32_t kind; // UNWIND_SECOND_LEVEL_COMPRESSED ++ uint16_t entryPageOffset; ++ uint16_t entryCount; ++ uint16_t encodingsPageOffset; ++ uint16_t encodingsCount; ++ // 32-bit entry array ++ // encodings array ++}; ++ ++#define UNWIND_INFO_COMPRESSED_ENTRY_FUNC_OFFSET(entry) (entry & 0x00FFFFFF) ++#define UNWIND_INFO_COMPRESSED_ENTRY_ENCODING_INDEX(entry) ((entry >> 24) & 0xFF) ++ ++ ++ ++#endif ++ diff --git a/lld.spec b/lld.spec index a1a604a..13e4c44 100644 --- a/lld.spec +++ b/lld.spec @@ -1,8 +1,8 @@ -%global rc_ver 2 -%global baserelease 3 +%global rc_ver 1 +%global baserelease 1 %global lld_srcdir lld-%{version}%{?rc_ver:rc%{rc_ver}}.src -%global maj_ver 11 -%global min_ver 1 +%global maj_ver 12 +%global min_ver 0 %global patch_ver 0 # Don't include unittests in automatic generation of provides or requires. @@ -25,7 +25,9 @@ Source4: lit.lld-test.cfg.py ExcludeArch: s390x Patch0: 0001-CMake-Check-for-gtest-headers-even-if-lit.py-is-not-.patch -Patch1: 0001-Revert-lld-Initial-commit-for-new-Mach-O-backend.patch + +# Bundle libunwind header need during build for MachO support +Patch1: include-libunwind-header.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -81,13 +83,7 @@ LLVM regression tests. %prep %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' -%setup -q -n %{lld_srcdir} - -%patch0 -p1 -b .gtest-fix -# Remove the MachO backend since it doesn't seem to work on big-endian hosts. -%ifarch s390x -%patch1 -p2 -b .remove-MachO -%endif +%autosetup -n %{lld_srcdir} -p1 %build @@ -157,6 +153,9 @@ cp %{_target_platform}/%{_lib}/libgtest*so* %{buildroot}%{_libdir}/lld/ # Install libraries and binaries %cmake_install +# This is generated by Patch1 during build and (probably) must be removed afterward +rm %{buildroot}%{_includedir}/mach-o/compact_unwind_encoding.h + # Required when using update-alternatives: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Alternatives/ touch %{buildroot}%{_bindir}/ld @@ -184,6 +183,7 @@ fi %{_bindir}/lld* %{_bindir}/ld.lld %{_bindir}/ld64.lld +%{_bindir}/ld64.lld.darwinnew %{_bindir}/wasm-ld %files devel @@ -203,6 +203,9 @@ fi %{_datadir}/lld/lit.lld-test.cfg.py %changelog +* Tue Feb 16 2021 sguelton@redhat.com - 12.0.0-0.1.rc1 +- llvm 12.0.0-rc1 release + * Tue Jan 26 2021 Fedora Release Engineering - 11.1.0-0.3.rc2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 601de68..584969d 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (lld-11.1.0rc2.src.tar.xz) = f4ab66bcfd974601bb53fc2e8d791316782d1143486beedb9cf71f8256ee67221bb8e5093e48f83a173c16299b89013052d2d423e45394f5250e29df7a268915 -SHA512 (lld-11.1.0rc2.src.tar.xz.sig) = 806a12aa29139705d5735beba558d8d7bbe3b5df80cea3266a470b6774e6190a8182a37c95c81f7dcc2395317d9d79c29389312f9c2eaeaf6073f37d3c432c85 +SHA512 (lld-12.0.0rc1.src.tar.xz) = b1938bdad6253b198edf8e80a685ba55fdddca28d9f8e6a7679429de2ef993f33734d1c149e62021b2027994d962ff4d2c502bf26f9814a70de91f23d93c0f23 +SHA512 (lld-12.0.0rc1.src.tar.xz.sig) = 4333a964346ee5a565ae016566b557bb8c6bc0e938b0ca0e26fffaa83b6e34dfc0e1cde3023bb3fe5805585eab420a45835466a477d5a0524cabb7a645817f93