From 4aed7ea6f89a091aede10ccf0fb45b3ce12c710d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 17 Jan 2018 17:29:21 -0500 Subject: [PATCH] update embedded LLD to 6.0.0rc1 --- CMakeLists.txt | 173 +- deps/lld-prebuilt/COFF/Options.inc | 85 +- deps/lld-prebuilt/DarwinLdOptions.inc | 7 + deps/lld-prebuilt/ELF/Options.inc | 170 +- deps/lld-prebuilt/MinGW/Options.inc | 114 + .../lld/{Config => Common}/Version.inc | 6 +- deps/lld-prebuilt/wasm/Options.inc | 106 + deps/lld/.arcconfig | 2 +- deps/lld/CMakeLists.txt | 8 +- deps/lld/CODE_OWNERS.TXT | 3 + deps/lld/COFF/CMakeLists.txt | 12 +- deps/lld/COFF/Chunks.cpp | 99 +- deps/lld/COFF/Chunks.h | 66 +- deps/lld/COFF/Config.h | 28 +- deps/lld/COFF/DLL.cpp | 67 +- deps/lld/COFF/Driver.cpp | 546 ++-- deps/lld/COFF/Driver.h | 50 +- deps/lld/COFF/DriverUtils.cpp | 238 +- deps/lld/COFF/Error.cpp | 115 - deps/lld/COFF/Error.h | 64 - deps/lld/COFF/ICF.cpp | 51 +- deps/lld/COFF/InputFiles.cpp | 398 ++- deps/lld/COFF/InputFiles.h | 70 +- deps/lld/COFF/LTO.cpp | 59 +- deps/lld/COFF/LTO.h | 3 +- deps/lld/COFF/MapFile.cpp | 10 +- deps/lld/COFF/MarkLive.cpp | 18 +- deps/lld/COFF/Memory.h | 52 - deps/lld/COFF/MinGW.cpp | 146 + deps/lld/COFF/MinGW.h | 38 + deps/lld/COFF/Options.td | 66 +- deps/lld/COFF/PDB.cpp | 553 +++- deps/lld/COFF/PDB.h | 7 +- deps/lld/COFF/Strings.cpp | 2 +- deps/lld/COFF/Strings.h | 2 +- deps/lld/COFF/SymbolTable.cpp | 276 +- deps/lld/COFF/SymbolTable.h | 35 +- deps/lld/COFF/Symbols.cpp | 30 +- deps/lld/COFF/Symbols.h | 146 +- deps/lld/COFF/Writer.cpp | 331 +- deps/lld/COFF/Writer.h | 6 +- deps/lld/Common/Args.cpp | 62 + deps/lld/Common/CMakeLists.txt | 32 + .../Error.cpp => Common/ErrorHandler.cpp} | 130 +- deps/lld/Common/Memory.cpp | 23 + deps/lld/{lib/Core => Common}/Reproduce.cpp | 18 +- deps/lld/Common/Strings.cpp | 32 + .../TargetOptionsCommandFlags.cpp | 12 +- deps/lld/Common/Threads.cpp | 12 + deps/lld/{lib/Config => Common}/Version.cpp | 4 +- deps/lld/ELF/AArch64ErrataFix.cpp | 648 ++++ deps/lld/ELF/AArch64ErrataFix.h | 52 + deps/lld/ELF/Arch/AArch64.cpp | 94 +- deps/lld/ELF/Arch/AMDGPU.cpp | 34 +- deps/lld/ELF/Arch/ARM.cpp | 199 +- deps/lld/ELF/Arch/AVR.cpp | 18 +- deps/lld/ELF/Arch/Mips.cpp | 471 ++- deps/lld/ELF/Arch/MipsArchTree.cpp | 54 +- deps/lld/ELF/Arch/PPC.cpp | 36 +- deps/lld/ELF/Arch/PPC64.cpp | 16 +- deps/lld/ELF/Arch/SPARCV9.cpp | 13 +- deps/lld/ELF/Arch/X86.cpp | 155 +- deps/lld/ELF/Arch/X86_64.cpp | 68 +- deps/lld/ELF/Bits.h | 35 + deps/lld/ELF/CMakeLists.txt | 17 +- deps/lld/ELF/Config.h | 40 +- deps/lld/ELF/Driver.cpp | 488 +-- deps/lld/ELF/Driver.h | 5 +- deps/lld/ELF/DriverUtils.cpp | 68 +- deps/lld/ELF/EhFrame.cpp | 42 +- deps/lld/ELF/EhFrame.h | 6 +- deps/lld/ELF/Error.h | 78 - deps/lld/ELF/Filesystem.cpp | 45 +- deps/lld/ELF/Filesystem.h | 3 +- deps/lld/ELF/GdbIndex.cpp | 96 +- deps/lld/ELF/GdbIndex.h | 89 +- deps/lld/ELF/ICF.cpp | 103 +- deps/lld/ELF/InputFiles.cpp | 623 ++-- deps/lld/ELF/InputFiles.h | 118 +- deps/lld/ELF/InputSection.cpp | 534 ++-- deps/lld/ELF/InputSection.h | 201 +- deps/lld/ELF/LTO.cpp | 61 +- deps/lld/ELF/LTO.h | 4 +- deps/lld/ELF/LinkerScript.cpp | 1402 ++++----- deps/lld/ELF/LinkerScript.h | 267 +- deps/lld/ELF/MapFile.cpp | 95 +- deps/lld/ELF/MapFile.h | 6 +- deps/lld/ELF/MarkLive.cpp | 191 +- deps/lld/ELF/Options.td | 177 +- deps/lld/ELF/OutputSections.cpp | 499 ++- deps/lld/ELF/OutputSections.h | 109 +- deps/lld/ELF/Relocations.cpp | 1151 ++++--- deps/lld/ELF/Relocations.h | 64 +- deps/lld/ELF/ScriptLexer.cpp | 54 +- deps/lld/ELF/ScriptLexer.h | 3 +- deps/lld/ELF/ScriptParser.cpp | 303 +- deps/lld/ELF/ScriptParser.h | 5 +- deps/lld/ELF/Strings.cpp | 31 +- deps/lld/ELF/Strings.h | 6 +- deps/lld/ELF/SymbolTable.cpp | 621 ++-- deps/lld/ELF/SymbolTable.h | 103 +- deps/lld/ELF/Symbols.cpp | 249 +- deps/lld/ELF/Symbols.h | 400 ++- deps/lld/ELF/SyntheticSections.cpp | 1678 +++++----- deps/lld/ELF/SyntheticSections.h | 360 ++- deps/lld/ELF/Target.cpp | 36 +- deps/lld/ELF/Target.h | 115 +- deps/lld/ELF/Thunks.cpp | 255 +- deps/lld/ELF/Thunks.h | 18 +- deps/lld/ELF/Writer.cpp | 1670 +++++----- deps/lld/ELF/Writer.h | 16 +- deps/lld/MinGW/CMakeLists.txt | 23 + deps/lld/MinGW/Driver.cpp | 247 ++ deps/lld/MinGW/Options.td | 68 + deps/lld/README.md | 12 +- deps/lld/cmake/modules/AddLLD.cmake | 12 +- deps/lld/docs/Driver.rst | 2 +- deps/lld/docs/NewLLD.rst | 139 +- deps/lld/docs/ReleaseNotes.rst | 173 +- deps/lld/docs/WebAssembly.rst | 36 + deps/lld/docs/_templates/indexsidebar.html | 2 +- deps/lld/docs/conf.py | 4 +- deps/lld/docs/index.rst | 51 +- deps/lld/docs/sphinx_intro.rst | 36 +- deps/lld/include/lld/Common/Args.h | 35 + .../include/lld/{Driver => Common}/Driver.h | 16 +- deps/lld/include/lld/Common/ErrorHandler.h | 112 + deps/lld/include/lld/{Core => Common}/LLVM.h | 4 +- deps/lld/{ELF => include/lld/Common}/Memory.h | 15 +- .../include/lld/{Core => Common}/Reproduce.h | 8 +- deps/lld/include/lld/Common/Strings.h | 23 + .../TargetOptionsCommandFlags.h | 3 +- .../lld/{ELF => include/lld/Common}/Threads.h | 24 +- .../include/lld/{Config => Common}/Version.h | 4 +- .../lld/{Config => Common}/Version.inc.in | 0 deps/lld/include/lld/Core/Atom.h | 2 +- deps/lld/include/lld/Core/DefinedAtom.h | 2 +- deps/lld/include/lld/Core/Error.h | 2 +- deps/lld/include/lld/Core/LinkingContext.h | 4 +- deps/lld/include/lld/Core/PassManager.h | 2 +- deps/lld/include/lld/Core/Reader.h | 2 +- deps/lld/include/lld/Core/SymbolTable.h | 2 +- deps/lld/include/lld/Core/Writer.h | 2 +- .../include/lld/ReaderWriter/YamlContext.h | 3 +- deps/lld/lib/CMakeLists.txt | 1 - deps/lld/lib/Config/CMakeLists.txt | 9 - deps/lld/lib/Core/CMakeLists.txt | 2 - deps/lld/lib/Core/Resolver.cpp | 6 +- deps/lld/lib/Core/SymbolTable.cpp | 2 +- deps/lld/lib/Driver/CMakeLists.txt | 4 +- deps/lld/lib/Driver/DarwinLdDriver.cpp | 6 +- deps/lld/lib/ReaderWriter/CMakeLists.txt | 1 - deps/lld/lib/ReaderWriter/FileArchive.cpp | 2 +- deps/lld/lib/ReaderWriter/MachO/ArchHandler.h | 2 +- .../ReaderWriter/MachO/ArchHandler_x86_64.cpp | 1 + .../lld/lib/ReaderWriter/MachO/CMakeLists.txt | 2 +- .../ReaderWriter/MachO/CompactUnwindPass.cpp | 2 +- .../ReaderWriter/MachO/FlatNamespaceFile.h | 2 + deps/lld/lib/ReaderWriter/MachO/GOTPass.cpp | 2 +- .../MachO/MachOLinkingContext.cpp | 2 +- .../ReaderWriter/MachO/MachONormalizedFile.h | 11 +- .../MachO/MachONormalizedFileBinaryReader.cpp | 7 +- .../MachO/MachONormalizedFileBinaryUtils.h | 2 +- .../MachO/MachONormalizedFileBinaryWriter.cpp | 11 +- .../MachO/MachONormalizedFileFromAtoms.cpp | 2 +- .../MachO/MachONormalizedFileToAtoms.cpp | 2 +- .../MachO/MachONormalizedFileYAML.cpp | 8 +- deps/lld/lib/ReaderWriter/MachO/ObjCPass.cpp | 2 +- deps/lld/lib/ReaderWriter/MachO/ShimPass.cpp | 2 +- deps/lld/lib/ReaderWriter/MachO/StubsPass.cpp | 2 +- .../ReaderWriter/YAML/ReaderWriterYAML.cpp | 6 +- deps/lld/test/CMakeLists.txt | 15 +- deps/lld/test/COFF/Inputs/alpha.ll | 9 + deps/lld/test/COFF/Inputs/beta.ll | 7 + deps/lld/test/COFF/Inputs/except_handler3.lib | Bin 0 -> 1364 bytes .../test/COFF/Inputs/far-arm-thumb-abs20.s | 2 + deps/lld/test/COFF/Inputs/gamma.ll | 14 + deps/lld/test/COFF/Inputs/library2-arm64.lib | Bin 0 -> 1720 bytes deps/lld/test/COFF/Inputs/library2.def | 3 + .../test/COFF/Inputs/locally-imported-def.s | 4 + .../test/COFF/Inputs/locally-imported-imp.s | 2 + deps/lld/test/COFF/Inputs/lto-cache.ll | 10 + deps/lld/test/COFF/Inputs/pdb-globals.yaml | 593 ++++ deps/lld/test/COFF/Inputs/pdb-hashes-1.yaml | 540 ++++ .../COFF/Inputs/pdb-hashes-2-missing.yaml | 321 ++ deps/lld/test/COFF/Inputs/pdb-hashes-2.yaml | 355 +++ deps/lld/test/COFF/Inputs/pdb-scopes-a.yaml | 116 +- deps/lld/test/COFF/Inputs/pdb-scopes-b.yaml | 100 +- deps/lld/test/COFF/Inputs/pdb_comdat_bar.yaml | 116 +- .../lld/test/COFF/Inputs/pdb_comdat_main.yaml | 116 +- deps/lld/test/COFF/Inputs/pdb_lines_1.yaml | 118 +- deps/lld/test/COFF/Inputs/pdb_lines_2.yaml | 70 +- deps/lld/test/COFF/arm-thumb-branch20-error.s | 10 + deps/lld/test/COFF/arm64-dynamicbase.s | 8 + deps/lld/test/COFF/arm64-import2.test | 85 + deps/lld/test/COFF/arm64-relocs-imports.test | 153 +- deps/lld/test/COFF/armnt-blx23t.test | 2 +- deps/lld/test/COFF/armnt-branch24t.test | 2 +- deps/lld/test/COFF/armnt-dynamicbase.test | 3 + deps/lld/test/COFF/armnt-imports.test | 2 +- deps/lld/test/COFF/armnt-mov32t-exec.test | 2 +- deps/lld/test/COFF/armnt-movt32t.test | 2 +- deps/lld/test/COFF/common-alignment.test | 78 + deps/lld/test/COFF/ctors_dtors_priority.s | 30 + deps/lld/test/COFF/debug-dwarf.test | 19 + deps/lld/test/COFF/def-export-stdcall.s | 78 +- deps/lld/test/COFF/delayimports-armnt.yaml | 106 + deps/lld/test/COFF/delayimports32.test | 4 +- deps/lld/test/COFF/dllexport-mingw.s | 24 + deps/lld/test/COFF/driver.test | 3 + deps/lld/test/COFF/duplicate.test | 12 + deps/lld/test/COFF/entry-drectve.test | 24 + deps/lld/test/COFF/entry-inference.test | 8 +- deps/lld/test/COFF/export-all.s | 86 + deps/lld/test/COFF/export-arm64.yaml | 70 + deps/lld/test/COFF/export-armnt.yaml | 95 + deps/lld/test/COFF/export32.test | 5 + deps/lld/test/COFF/filename-casing.s | 14 + deps/lld/test/COFF/force.test | 7 +- deps/lld/test/COFF/guardcf.test | 6 + deps/lld/test/COFF/hello32.test | 6 +- deps/lld/test/COFF/icf-associative.test | 2 +- deps/lld/test/COFF/icf-executable.s | 18 + deps/lld/test/COFF/icf-simple.test | 27 +- deps/lld/test/COFF/icf-xdata.s | 86 + deps/lld/test/COFF/ignore4217.yaml | 72 + deps/lld/test/COFF/include.test | 13 + deps/lld/test/COFF/libpath.test | 12 +- deps/lld/test/COFF/linkrepro-manifest.test | 12 + deps/lld/test/COFF/linkrepro-pdb.test | 9 + deps/lld/test/COFF/linkrepro-res.test | 12 + deps/lld/test/COFF/loadcfg.test | 21 +- .../lld/test/COFF/locally-imported-arm64.test | 61 + .../COFF/locally-imported-warn-multiple.s | 14 + deps/lld/test/COFF/locally-imported.test | 4 +- deps/lld/test/COFF/long-section-name.test | 23 +- deps/lld/test/COFF/lto-cache.ll | 21 + deps/lld/test/COFF/lto-opt-level.ll | 12 +- deps/lld/test/COFF/lto-reloc-model.ll | 19 + deps/lld/test/COFF/lto.ll | 16 +- deps/lld/test/COFF/manifest.test | 16 +- deps/lld/test/COFF/manifestinput-error.test | 10 + .../test/COFF/manifestinput-nowarning.test | 11 + deps/lld/test/COFF/manifestinput.test | 4 +- deps/lld/test/COFF/msvclto-archive.ll | 6 +- deps/lld/test/COFF/msvclto-order.ll | 2 +- deps/lld/test/COFF/msvclto.ll | 2 +- deps/lld/test/COFF/nodefaultlib.test | 6 +- deps/lld/test/COFF/nopdb.test | 14 - deps/lld/test/COFF/options.test | 8 +- deps/lld/test/COFF/pdata-arm64.yaml | 87 + deps/lld/test/COFF/pdb-comdat.test | 43 +- deps/lld/test/COFF/pdb-diff.test | 17 +- deps/lld/test/COFF/pdb-global-gc.yaml | 22 +- deps/lld/test/COFF/pdb-global-hashes.test | 93 + deps/lld/test/COFF/pdb-globals.test | 42 + deps/lld/test/COFF/pdb-heapsite.yaml | 1561 ++++++++++ deps/lld/test/COFF/pdb-import-gc.yaml | 20 +- deps/lld/test/COFF/pdb-invalid-func-type.yaml | 2 +- deps/lld/test/COFF/pdb-lib.s | 6 +- deps/lld/test/COFF/pdb-linker-module.test | 38 +- deps/lld/test/COFF/pdb-none.test | 3 +- deps/lld/test/COFF/pdb-options.test | 2 +- deps/lld/test/COFF/pdb-procid-remapping.test | 29 + deps/lld/test/COFF/pdb-publics-import.test | 42 + deps/lld/test/COFF/pdb-safeseh.yaml | 11 +- deps/lld/test/COFF/pdb-same-name.test | 23 + deps/lld/test/COFF/pdb-scopes.test | 6 +- deps/lld/test/COFF/pdb-secrel-absolute.yaml | 11 +- deps/lld/test/COFF/pdb-source-lines.test | 35 +- deps/lld/test/COFF/pdb-symbol-types.yaml | 20 +- deps/lld/test/COFF/pdb-thunk.yaml | 2747 +++++++++++++++++ .../lld/test/COFF/pdb-type-server-simple.test | 24 +- deps/lld/test/COFF/pdb.test | 160 +- deps/lld/test/COFF/reloc-arm.test | 16 +- deps/lld/test/COFF/reloc-discarded-dwarf.s | 2 + deps/lld/test/COFF/reloc-discarded-early.s | 8 + deps/lld/test/COFF/reloc-discarded-early2.s | 9 + deps/lld/test/COFF/reloc-discarded.s | 1 - deps/lld/test/COFF/responsefile.test | 20 +- deps/lld/test/COFF/rsds.test | 40 +- deps/lld/test/COFF/safeseh-md.s | 34 + deps/lld/test/COFF/safeseh.s | 15 +- deps/lld/test/COFF/section-size.s | 14 + deps/lld/test/COFF/seh-comdat.test | 66 + deps/lld/test/COFF/strtab-size.s | 216 ++ deps/lld/test/COFF/subsystem-drectve.test | 21 + deps/lld/test/COFF/symtab.test | 6 +- deps/lld/test/COFF/thinlto.ll | 2 +- deps/lld/test/COFF/wholearchive.s | 19 + deps/lld/test/COFF/wx.s | 17 + deps/lld/test/ELF/Inputs/amdgpu-kernel-0.s | 6 + deps/lld/test/ELF/Inputs/amdgpu-kernel-1.s | 6 + deps/lld/test/ELF/Inputs/amdgpu-kernel-2.o | Bin 0 -> 408 bytes deps/lld/test/ELF/Inputs/compress-debug.s | 5 + deps/lld/test/ELF/Inputs/copy-rel-abs.s | 13 + deps/lld/test/ELF/Inputs/copy-rel-large.s | 4 + deps/lld/test/ELF/Inputs/copy-rel-pie.s | 1 + .../ELF/Inputs/corrupt-version-reference.so | Bin 0 -> 134272 bytes .../ELF/Inputs/dynamic-list-weak-archive.s | 2 + deps/lld/test/ELF/Inputs/eh-frame.s | 3 + deps/lld/test/ELF/Inputs/gc-sections-shared.s | 3 + .../lld/test/ELF/Inputs/gc-sections-shared2.s | 3 + .../test/ELF/Inputs/local-symbol-in-dso.so | Bin 0 -> 5128 bytes deps/lld/test/ELF/Inputs/map-file5.s | 23 + deps/lld/test/ELF/Inputs/mips-micro.s | 12 + deps/lld/test/ELF/Inputs/shared3.s | 2 +- .../lld/test/ELF/Inputs/shlib-undefined-ref.s | 4 + deps/lld/test/ELF/Inputs/undefined-error.s | 1 + deps/lld/test/ELF/Inputs/verdef-defaultver.s | 3 + deps/lld/test/ELF/Inputs/verneed.so.sh | 58 - deps/lld/test/ELF/Inputs/verneed1.s | 32 + deps/lld/test/ELF/Inputs/verneed1.so | Bin 2632 -> 0 bytes deps/lld/test/ELF/Inputs/verneed2.s | 5 + deps/lld/test/ELF/Inputs/verneed2.so | Bin 2200 -> 0 bytes deps/lld/test/ELF/Inputs/weak-undef-lazy.s | 3 + deps/lld/test/ELF/Inputs/wrap-no-real.s | 3 + deps/lld/test/ELF/Inputs/wrap-no-real2.s | 2 + deps/lld/test/ELF/Inputs/wrap.s | 5 +- .../test/ELF/Inputs/writable-sec-plt-reloc.s | 4 + .../ELF/Inputs/znotext-copy-relocations.s | 5 + .../znotext-plt-relocations-protected.s | 5 + .../test/ELF/Inputs/znotext-plt-relocations.s | 10 + deps/lld/test/ELF/aarch64-abs16.s | 2 +- deps/lld/test/ELF/aarch64-abs32.s | 2 +- deps/lld/test/ELF/aarch64-call26-error.s | 11 - deps/lld/test/ELF/aarch64-call26-thunk.s | 21 + .../ELF/aarch64-cortex-a53-843419-address.s | 180 ++ .../test/ELF/aarch64-cortex-a53-843419-cli.s | 10 + .../ELF/aarch64-cortex-a53-843419-large.s | 115 + .../ELF/aarch64-cortex-a53-843419-nopatch.s | 338 ++ .../ELF/aarch64-cortex-a53-843419-recognize.s | 563 ++++ .../ELF/aarch64-cortex-a53-843419-thunk.s | 57 + deps/lld/test/ELF/aarch64-gnu-ifunc-plt.s | 2 +- deps/lld/test/ELF/aarch64-gnu-ifunc.s | 2 +- deps/lld/test/ELF/aarch64-got-reloc.s | 4 +- deps/lld/test/ELF/aarch64-got-relocations.s | 2 +- deps/lld/test/ELF/aarch64-jump26-error.s | 11 - deps/lld/test/ELF/aarch64-jump26-thunk.s | 20 + .../test/ELF/aarch64-ldprel-lo19-invalid.s | 11 + deps/lld/test/ELF/aarch64-lo12-alignment.s | 45 + deps/lld/test/ELF/aarch64-load-alignment.s | 11 + deps/lld/test/ELF/aarch64-prel16.s | 2 +- deps/lld/test/ELF/aarch64-prel32.s | 2 +- deps/lld/test/ELF/aarch64-thunk-pi.s | 91 + deps/lld/test/ELF/aarch64-thunk-script.s | 41 + .../test/ELF/aarch64-thunk-section-location.s | 41 + deps/lld/test/ELF/aarch64-tls-gdie.s | 2 +- deps/lld/test/ELF/aarch64-tls-ie.s | 2 +- deps/lld/test/ELF/aarch64-tls-static.s | 2 +- deps/lld/test/ELF/aarch64-tlsdesc.s | 2 +- deps/lld/test/ELF/aarch64-undefined-weak.s | 6 +- deps/lld/test/ELF/abs-hidden.s | 2 +- deps/lld/test/ELF/allow-multiple-definition.s | 5 + deps/lld/test/ELF/amdgpu-elf-flags-err.s | 7 + deps/lld/test/ELF/amdgpu-elf-flags.s | 10 + deps/lld/test/ELF/amdgpu-relocs.s | 15 +- deps/lld/test/ELF/arm-bl-v6.s | 51 + deps/lld/test/ELF/arm-blx-v4t.s | 30 + deps/lld/test/ELF/arm-branch-error.s | 19 - deps/lld/test/ELF/arm-branch-rangethunk.s | 34 + .../ELF/arm-branch-undef-weak-plt-thunk.s | 35 + deps/lld/test/ELF/arm-copy.s | 2 +- .../test/ELF/arm-exidx-dedup-and-sentinel.s | 29 + deps/lld/test/ELF/arm-exidx-dedup.s | 126 + deps/lld/test/ELF/arm-exidx-gc.s | 2 +- deps/lld/test/ELF/arm-exidx-order.s | 4 +- deps/lld/test/ELF/arm-exidx-sentinel-orphan.s | 2 +- deps/lld/test/ELF/arm-exidx-shared.s | 6 +- deps/lld/test/ELF/arm-gnu-ifunc-plt.s | 56 +- deps/lld/test/ELF/arm-gnu-ifunc.s | 41 +- deps/lld/test/ELF/arm-got-relative.s | 2 +- deps/lld/test/ELF/arm-icf-exidx.s | 2 +- deps/lld/test/ELF/arm-pie-relative.s | 2 +- deps/lld/test/ELF/arm-plt-reloc.s | 264 +- deps/lld/test/ELF/arm-static-defines.s | 2 +- deps/lld/test/ELF/arm-thumb-branch-error.s | 19 - .../test/ELF/arm-thumb-branch-rangethunk.s | 36 + .../lld/test/ELF/arm-thumb-condbranch-thunk.s | 117 + .../lld/test/ELF/arm-thumb-interwork-shared.s | 37 +- .../test/ELF/arm-thumb-mix-range-thunk-os.s | 195 ++ .../test/ELF/arm-thumb-no-undefined-thunk.s | 2 +- .../test/ELF/arm-thumb-plt-range-thunk-os.s | 92 + deps/lld/test/ELF/arm-thumb-plt-reloc.s | 70 +- deps/lld/test/ELF/arm-thumb-range-thunk-os.s | 159 + .../lld/test/ELF/arm-thumb-thunk-empty-pass.s | 32 + deps/lld/test/ELF/arm-thumb-thunk-symbols.s | 6 +- deps/lld/test/ELF/arm-thunk-edgecase.s | 37 + deps/lld/test/ELF/arm-thunk-largesection.s | 42 + .../test/ELF/arm-thunk-linkerscript-dotexpr.s | 77 + .../test/ELF/arm-thunk-linkerscript-large.s | 176 ++ .../test/ELF/arm-thunk-linkerscript-orphan.s | 63 + .../test/ELF/arm-thunk-linkerscript-sort.s | 71 + deps/lld/test/ELF/arm-thunk-linkerscript.s | 78 + deps/lld/test/ELF/arm-thunk-multipass.s | 96 + deps/lld/test/ELF/arm-thunk-re-add.s | 123 + deps/lld/test/ELF/arm-thunk-toolargesection.s | 19 + deps/lld/test/ELF/arm-tls-gd-nonpreemptible.s | 2 +- deps/lld/test/ELF/arm-tls-gd32.s | 2 +- deps/lld/test/ELF/arm-tls-ie32.s | 2 +- deps/lld/test/ELF/arm-tls-ldm32.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-gd-ie.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-gd-le.s | 6 +- deps/lld/test/ELF/arm-tls-norelax-ie-le.s | 2 +- deps/lld/test/ELF/arm-tls-norelax-ld-le.s | 2 +- deps/lld/test/ELF/arm-undefined-weak.s | 2 +- deps/lld/test/ELF/as-needed.s | 4 + deps/lld/test/ELF/assignment-archive.s | 27 + .../test/ELF/avoid-empty-program-headers.s | 6 +- deps/lld/test/ELF/basic-aarch64.s | 16 +- deps/lld/test/ELF/basic-mips.s | 4 +- deps/lld/test/ELF/basic-ppc.s | 4 +- deps/lld/test/ELF/basic-sparcv9.s | 16 +- deps/lld/test/ELF/basic.s | 18 +- deps/lld/test/ELF/basic32.s | 16 +- deps/lld/test/ELF/basic64be.s | 2 +- deps/lld/test/ELF/build-id.s | 21 +- deps/lld/test/ELF/chroot.s | 12 + deps/lld/test/ELF/comment-gc.s | 3 +- deps/lld/test/ELF/common-gc.s | 41 + deps/lld/test/ELF/common-gc2.s | 15 + deps/lld/test/ELF/common-gc3.s | 18 + deps/lld/test/ELF/common.s | 10 +- .../test/ELF/compress-debug-sections-reloc.s | 26 + deps/lld/test/ELF/compress-debug-sections.s | 7 +- deps/lld/test/ELF/compressed-debug-conflict.s | 29 + deps/lld/test/ELF/compressed-debug-input.s | 16 +- deps/lld/test/ELF/conflict-debug-variable.s | 144 + deps/lld/test/ELF/conflict-debug-variable2.s | 160 + deps/lld/test/ELF/copy-errors.s | 3 + deps/lld/test/ELF/copy-rel-abs.s | 47 + deps/lld/test/ELF/copy-rel-large.s | 20 + deps/lld/test/ELF/copy-rel-pie.s | 2 +- .../test/ELF/corrupted-version-reference.s | 14 + deps/lld/test/ELF/debug-gc.s | 4 +- deps/lld/test/ELF/defsym-dynamic.s | 10 + deps/lld/test/ELF/defsym.s | 42 +- deps/lld/test/ELF/driver-access.test | 2 +- deps/lld/test/ELF/driver.test | 4 +- deps/lld/test/ELF/duplicated-synthetic-sym.s | 3 +- deps/lld/test/ELF/dynamic-got.s | 2 +- deps/lld/test/ELF/dynamic-list-empty.s | 18 + deps/lld/test/ELF/dynamic-list-preempt.s | 76 + deps/lld/test/ELF/dynamic-list-weak-archive.s | 18 + deps/lld/test/ELF/dynamic-list-wildcard.s | 53 + deps/lld/test/ELF/dynamic-list.s | 22 +- deps/lld/test/ELF/dynamic-no-rosegment.s | 15 + deps/lld/test/ELF/dynamic-reloc-in-ro.s | 6 +- deps/lld/test/ELF/dynamic-reloc.s | 2 +- deps/lld/test/ELF/dynstr-no-rosegment.s | 12 + deps/lld/test/ELF/dynsym-no-rosegment.s | 27 + deps/lld/test/ELF/dynsym-pie.s | 52 +- deps/lld/test/ELF/edata-etext.s | 2 +- deps/lld/test/ELF/edata-no-bss.s | 18 + deps/lld/test/ELF/eh-align-cie.s | 2 +- deps/lld/test/ELF/eh-frame-hdr-augmentation.s | 2 +- deps/lld/test/ELF/eh-frame-hdr-icf-fde.s | 95 + deps/lld/test/ELF/eh-frame-hdr-icf.s | 15 +- deps/lld/test/ELF/eh-frame-hdr.s | 12 +- deps/lld/test/ELF/eh-frame-merge.s | 2 +- .../test/ELF/eh-frame-padding-no-rosegment.s | 2 +- deps/lld/test/ELF/eh-frame.s | 12 + deps/lld/test/ELF/emit-relocs-gc.s | 30 + deps/lld/test/ELF/emit-relocs-merge.s | 2 +- .../lld/test/ELF/emit-relocs-mergeable-i386.s | 66 + deps/lld/test/ELF/emit-relocs-mergeable.s | 53 + deps/lld/test/ELF/emit-relocs-shared.s | 2 +- deps/lld/test/ELF/emit-relocs.s | 13 +- deps/lld/test/ELF/exclude-libs.s | 6 + .../test/ELF/executable-undefined-ignoreall.s | 13 + ...executable-undefined-protected-ignoreall.s | 8 + deps/lld/test/ELF/file-access.s | 13 + deps/lld/test/ELF/fill-trap.s | 25 + deps/lld/test/ELF/filter.s | 6 +- deps/lld/test/ELF/format-binary-non-ascii.s | 15 + deps/lld/test/ELF/gc-collect-undefined.s | 19 + deps/lld/test/ELF/gc-merge-local-sym.s | 2 +- .../ELF/gc-sections-linker-defined-symbol.s | 18 + deps/lld/test/ELF/gc-sections-merge-addend.s | 2 +- .../ELF/gc-sections-merge-implicit-addend.s | 2 +- deps/lld/test/ELF/gc-sections-merge.s | 4 +- deps/lld/test/ELF/gc-sections-print.s | 6 + deps/lld/test/ELF/gc-sections-shared.s | 93 +- deps/lld/test/ELF/gc-sections-undefined.s | 10 + deps/lld/test/ELF/gdb-index-base-addr.s | 70 + deps/lld/test/ELF/gdb-index-dup-types.s | 2 +- deps/lld/test/ELF/gdb-index-empty.s | 4 +- deps/lld/test/ELF/gdb-index-gc-sections.s | 2 +- deps/lld/test/ELF/gdb-index-noranges.s | 49 + deps/lld/test/ELF/gdb-index-ranges.s | 2 +- deps/lld/test/ELF/gdb-index-tls.s | 91 + deps/lld/test/ELF/gdb-index.s | 30 +- .../global-offset-table-position-aarch64.s | 2 +- .../ELF/global-offset-table-position-arm.s | 2 +- .../ELF/global-offset-table-position-i386.s | 2 +- .../test/ELF/global-offset-table-position.s | 2 +- .../lld/test/ELF/global_offset_table_shared.s | 2 +- deps/lld/test/ELF/gnu-hash-table-copy.s | 30 + deps/lld/test/ELF/gnu-hash-table-many.s | 55 + deps/lld/test/ELF/gnu-hash-table-rwsegment.s | 20 + deps/lld/test/ELF/gnu-hash-table.s | 79 +- deps/lld/test/ELF/gnu-ifunc-dynsym.s | 19 + deps/lld/test/ELF/gnu-ifunc-dyntags.s | 41 + deps/lld/test/ELF/gnu-ifunc-gotpcrel.s | 2 +- deps/lld/test/ELF/gnu-ifunc-i386.s | 6 +- deps/lld/test/ELF/gnu-ifunc-plt-i386.s | 2 +- deps/lld/test/ELF/gnu-ifunc-plt.s | 2 +- deps/lld/test/ELF/gnu-ifunc-shared.s | 2 +- deps/lld/test/ELF/gnu-ifunc.s | 6 +- deps/lld/test/ELF/got-aarch64.s | 2 +- deps/lld/test/ELF/got.s | 2 +- deps/lld/test/ELF/got32-i386-pie-rw.s | 17 + deps/lld/test/ELF/got32-i386.s | 2 +- deps/lld/test/ELF/got32x-i386.s | 4 +- deps/lld/test/ELF/gotpc-relax-nopic.s | 6 +- deps/lld/test/ELF/gotpc-relax-und-dso.s | 2 +- deps/lld/test/ELF/gotpcrelx.s | 2 +- deps/lld/test/ELF/help.s | 5 + deps/lld/test/ELF/i386-debug-noabs.test | 33 + deps/lld/test/ELF/i386-got-and-copy.s | 2 +- deps/lld/test/ELF/i386-got-value.s | 33 + deps/lld/test/ELF/i386-gotoff-shared.s | 2 +- deps/lld/test/ELF/i386-gotpc-dynamic.s | 2 +- deps/lld/test/ELF/i386-gotpc.s | 2 +- deps/lld/test/ELF/i386-pc8-pc16-addend.s | 2 +- deps/lld/test/ELF/i386-reloc-16.s | 2 +- deps/lld/test/ELF/i386-reloc-8.s | 2 +- deps/lld/test/ELF/i386-reloc-range.s | 2 +- .../lld/test/ELF/i386-reloc8-reloc16-addend.s | 2 +- deps/lld/test/ELF/i386-tls-ie-shared.s | 2 +- .../test/ELF/i386-tls-initial-exec-local.s | 36 + deps/lld/test/ELF/icf-absolute.s | 2 +- deps/lld/test/ELF/icf-comdat.s | 2 +- deps/lld/test/ELF/icf-i386.s | 2 +- deps/lld/test/ELF/icf-merge-sec.s | 2 +- deps/lld/test/ELF/icf-merge.s | 6 +- deps/lld/test/ELF/icf-non-mergeable.s | 4 +- deps/lld/test/ELF/icf-none.s | 2 +- deps/lld/test/ELF/icf-symbol-type.s | 26 + deps/lld/test/ELF/icf1.s | 2 +- deps/lld/test/ELF/icf2.s | 2 +- deps/lld/test/ELF/icf3.s | 2 +- deps/lld/test/ELF/icf4.s | 2 +- deps/lld/test/ELF/icf5.s | 2 +- deps/lld/test/ELF/icf6.s | 2 +- deps/lld/test/ELF/icf7.s | 2 +- deps/lld/test/ELF/icf9.s | 22 +- deps/lld/test/ELF/image-base.s | 7 +- deps/lld/test/ELF/init_fini_priority.s | 24 +- deps/lld/test/ELF/invalid-linkerscript.test | 2 +- .../test/ELF/invalid-local-symbol-in-dso.s | 13 + .../ELF/invalid-undef-section-symbol.test | 27 + .../ELF/invalid/Inputs/section-index2.elf | Bin 474 -> 0 bytes .../invalid/invalid-debug-relocations.test | 3 +- deps/lld/test/ELF/invalid/invalid-elf.test | 4 - .../ELF/invalid/invalid-relocation-x64.test | 18 +- deps/lld/test/ELF/libsearch.s | 1 + .../linkerscript/Inputs/common-filespec1.s | 2 + .../linkerscript/Inputs/common-filespec2.s | 2 + .../Inputs/copy-rel-symbol-value.s | 5 + .../ELF/linkerscript/Inputs/provide-shared.s | 5 + .../Inputs/symbol-reserved.script | 5 + deps/lld/test/ELF/linkerscript/absolute2.s | 17 + .../ELF/linkerscript/align-section-offset.s | 11 + .../lld/test/ELF/linkerscript/align-section.s | 6 + deps/lld/test/ELF/linkerscript/align.s | 45 + .../test/ELF/linkerscript/arm-exidx-order.s | 19 + .../arm-exidx-sentinel-and-assignment.s | 41 + deps/lld/test/ELF/linkerscript/at-addr.s | 4 - deps/lld/test/ELF/linkerscript/at.s | 25 - .../test/ELF/linkerscript/common-exclude.s | 86 + .../test/ELF/linkerscript/common-filespec.s | 105 + deps/lld/test/ELF/linkerscript/common.s | 8 +- .../compress-debug-sections-custom.s | 35 + .../linkerscript/compress-debug-sections.s | 4 +- .../linkerscript/copy-rel-symbol-value-err.s | 12 + .../ELF/linkerscript/copy-rel-symbol-value.s | 27 + .../lld/test/ELF/linkerscript/data-commands.s | 36 + .../ELF/linkerscript/data-segment-relro.s | 4 +- deps/lld/test/ELF/linkerscript/diagnostic.s | 14 +- .../ELF/linkerscript/discard-section-err.s | 2 + .../ELF/linkerscript/early-assign-symbol.s | 24 +- .../eh-frame-reloc-out-of-range.s | 2 +- .../linkerscript/emit-reloc-section-names.s | 22 + deps/lld/test/ELF/linkerscript/emit-reloc.s | 2 +- .../ELF/linkerscript/emit-relocs-multiple.s | 2 +- .../test/ELF/linkerscript/extend-pt-load.s | 13 +- .../lld/test/ELF/linkerscript/filename-spec.s | 47 +- deps/lld/test/ELF/linkerscript/header-addr.s | 22 +- deps/lld/test/ELF/linkerscript/header-phdr.s | 13 + deps/lld/test/ELF/linkerscript/image-base.s | 18 + .../linkerscript/implicit-program-header.s | 2 +- .../lld/test/ELF/linkerscript/include-cycle.s | 15 + .../linker-script-in-search-path.s | 19 + deps/lld/test/ELF/linkerscript/linkerscript.s | 4 +- deps/lld/test/ELF/linkerscript/memory-at.s | 46 + deps/lld/test/ELF/linkerscript/memory-err.s | 16 + deps/lld/test/ELF/linkerscript/memory.s | 4 +- deps/lld/test/ELF/linkerscript/memory2.s | 14 + deps/lld/test/ELF/linkerscript/memory3.s | 23 + .../test/ELF/linkerscript/merge-sections.s | 2 +- deps/lld/test/ELF/linkerscript/no-space.s | 4 +- .../lld/test/ELF/linkerscript/nobits-offset.s | 18 + deps/lld/test/ELF/linkerscript/noload.s | 4 +- deps/lld/test/ELF/linkerscript/non-alloc.s | 2 +- deps/lld/test/ELF/linkerscript/operators.s | 8 + .../test/ELF/linkerscript/orphan-discard.s | 25 + deps/lld/test/ELF/linkerscript/orphan-end.s | 57 + deps/lld/test/ELF/linkerscript/orphan-phdrs.s | 34 + .../lld/test/ELF/linkerscript/orphan-report.s | 54 + deps/lld/test/ELF/linkerscript/out-of-order.s | 2 +- deps/lld/test/ELF/linkerscript/phdr-check.s | 4 +- deps/lld/test/ELF/linkerscript/phdrs.s | 4 +- .../test/ELF/linkerscript/provide-shared.s | 13 + deps/lld/test/ELF/linkerscript/region-alias.s | 54 + .../test/ELF/linkerscript/repsection-symbol.s | 2 +- .../lld/test/ELF/linkerscript/sections-sort.s | 2 +- .../test/ELF/linkerscript/segment-headers.s | 26 + .../lld/test/ELF/linkerscript/segment-start.s | 2 +- .../test/ELF/linkerscript/sort-non-script.s | 2 +- deps/lld/test/ELF/linkerscript/subalign.s | 17 + .../test/ELF/linkerscript/symbol-assignexpr.s | 8 +- .../test/ELF/linkerscript/symbol-only-flags.s | 20 + deps/lld/test/ELF/linkerscript/symbol-only.s | 2 +- .../ELF/linkerscript/symbol-ordering-file.s | 23 + .../test/ELF/linkerscript/symbol-reserved.s | 28 + deps/lld/test/ELF/linkerscript/symbols.s | 13 +- .../test/ELF/linkerscript/thunk-gen-mips.s | 40 + .../test/ELF/linkerscript/unused-synthetic.s | 10 + .../ELF/linkerscript/version-linker-symbol.s | 28 + deps/lld/test/ELF/lit.local.cfg | 1 - deps/lld/test/ELF/local-got-pie.s | 2 +- deps/lld/test/ELF/local-got-shared.s | 2 +- deps/lld/test/ELF/local-got.s | 2 +- deps/lld/test/ELF/lto-plugin-ignore.s | 11 + .../test/ELF/lto/Inputs/data-ordering-lto.ll | 6 + .../lto/Inputs/linker-script-symbols-ipo.ll | 9 + .../ELF/lto/Inputs/symbol-ordering-lto.ll | 10 + deps/lld/test/ELF/lto/cache.ll | 14 +- deps/lld/test/ELF/lto/data-ordering-lto.s | 27 + deps/lld/test/ELF/lto/keep-undefined.ll | 20 + .../ELF/lto/linker-script-symbols-assign.ll | 48 + .../test/ELF/lto/linker-script-symbols-ipo.ll | 32 + .../lld/test/ELF/lto/linker-script-symbols.ll | 29 + deps/lld/test/ELF/lto/opt-level.ll | 21 +- deps/lld/test/ELF/lto/opt-remarks.ll | 31 +- deps/lld/test/ELF/lto/relocatable.ll | 55 + deps/lld/test/ELF/lto/save-temps.ll | 7 + deps/lld/test/ELF/lto/section-name.ll | 35 + deps/lld/test/ELF/lto/shlib-undefined.ll | 2 +- deps/lld/test/ELF/lto/symbol-ordering-lto.s | 25 + deps/lld/test/ELF/lto/thinlto.ll | 8 +- deps/lld/test/ELF/lto/verify-invalid.ll | 2 + deps/lld/test/ELF/lto/wrap-1.ll | 2 +- deps/lld/test/ELF/lto/wrap-2.ll | 4 +- deps/lld/test/ELF/many-alloc-sections.s | 3 +- deps/lld/test/ELF/many-sections.s | 7 +- deps/lld/test/ELF/map-file.s | 86 +- deps/lld/test/ELF/merge-align.s | 34 + deps/lld/test/ELF/merge-entsize.s | 27 + deps/lld/test/ELF/merge-reloc.s | 19 +- deps/lld/test/ELF/merge-string.s | 14 +- deps/lld/test/ELF/merge.s | 2 +- deps/lld/test/ELF/mips-26-n32-n64.s | 35 + deps/lld/test/ELF/mips-64-gprel-so.s | 2 +- deps/lld/test/ELF/mips-64-rels.s | 6 +- deps/lld/test/ELF/mips-align-err.s | 2 +- deps/lld/test/ELF/mips-elf-flags-err.s | 10 +- deps/lld/test/ELF/mips-elf-flags.s | 29 + deps/lld/test/ELF/mips-got-page-script.s | 65 + deps/lld/test/ELF/mips-got-relocs.s | 4 +- deps/lld/test/ELF/mips-got-script.s | 47 + deps/lld/test/ELF/mips-gp-disp.s | 2 +- deps/lld/test/ELF/mips-gp-ext.s | 7 + deps/lld/test/ELF/mips-gp-local.s | 2 +- deps/lld/test/ELF/mips-gprel32-relocs-gp0.s | 8 +- deps/lld/test/ELF/mips-gprel32-relocs.s | 8 +- deps/lld/test/ELF/mips-hilo-gp-disp.s | 4 +- deps/lld/test/ELF/mips-hilo-hi-only.s | 2 +- deps/lld/test/ELF/mips-micro-got.s | 46 + deps/lld/test/ELF/mips-micro-got64.s | 48 + deps/lld/test/ELF/mips-micro-jal.s | 155 + deps/lld/test/ELF/mips-micro-plt.s | 91 + deps/lld/test/ELF/mips-micro-relocs.s | 59 + deps/lld/test/ELF/mips-micro-thunks.s | 47 + deps/lld/test/ELF/mips-n32-rels.s | 6 +- .../ELF/mips-out-of-bounds-call16-reloc.s | 29 + deps/lld/test/ELF/no-inhibit-exec.s | 4 + deps/lld/test/ELF/non-abs-reloc.s | 2 +- deps/lld/test/ELF/noplt-pie.s | 2 +- deps/lld/test/ELF/pack-dyn-relocs.s | 210 ++ deps/lld/test/ELF/pie-weak.s | 7 +- deps/lld/test/ELF/ppc-relocs.s | 36 +- deps/lld/test/ELF/ppc64-addr16-error.s | 2 +- deps/lld/test/ELF/pr34660.s | 25 + deps/lld/test/ELF/pr34872.s | 14 + deps/lld/test/ELF/progname.s | 2 +- deps/lld/test/ELF/relocatable-comdat2.s | 35 + deps/lld/test/ELF/relocatable-common.s | 5 +- .../test/ELF/relocatable-compressed-input.s | 10 +- deps/lld/test/ELF/relocatable.s | 2 +- deps/lld/test/ELF/relocation-b-aarch64.test | 48 + deps/lld/test/ELF/relocation-copy-alias.s | 8 +- .../test/ELF/relocation-copy-align-common.s | 2 +- deps/lld/test/ELF/relocation-copy-flags.s | 2 +- deps/lld/test/ELF/relocation-copy-relro.s | 2 +- deps/lld/test/ELF/relocation-i686.s | 2 +- deps/lld/test/ELF/relocation-relative-weak.s | 1 + deps/lld/test/ELF/relocation-size-err.s | 12 + deps/lld/test/ELF/relocation.s | 2 +- deps/lld/test/ELF/relro-copyrel-bss-script.s | 40 + .../ELF/relro-non-contiguous-script-data.s | 25 + deps/lld/test/ELF/relro-non-contiguous.s | 28 + deps/lld/test/ELF/relro-omagic.s | 2 +- deps/lld/test/ELF/relro-script.s | 29 + deps/lld/test/ELF/reproduce-thin-archive.s | 6 + deps/lld/test/ELF/reproduce.s | 31 +- deps/lld/test/ELF/resolution-end.s | 2 +- deps/lld/test/ELF/retain-symbols-file.s | 4 +- deps/lld/test/ELF/section-metadata-err.s | 2 +- deps/lld/test/ELF/segments.s | 5 + deps/lld/test/ELF/shared-lazy.s | 16 + deps/lld/test/ELF/shared.s | 6 +- deps/lld/test/ELF/shlib-undefined-shared.s | 15 + deps/lld/test/ELF/silent-ignore.test | 20 + deps/lld/test/ELF/sort-norosegment.s | 2 +- deps/lld/test/ELF/startstop-gccollect.s | 12 +- deps/lld/test/ELF/startstop.s | 2 +- deps/lld/test/ELF/string-gc.s | 4 +- deps/lld/test/ELF/strip-debug.s | 27 +- deps/lld/test/ELF/symbol-ordering-file2.s | 21 + deps/lld/test/ELF/synthetic-got.s | 4 +- deps/lld/test/ELF/sysroot.s | 2 + deps/lld/test/ELF/sysv-hash-no-rosegment.s | 13 + deps/lld/test/ELF/tls-dynamic-i686.s | 2 +- deps/lld/test/ELF/tls-dynamic.s | 2 +- deps/lld/test/ELF/tls-got.s | 2 +- deps/lld/test/ELF/tls-i686.s | 2 +- deps/lld/test/ELF/tls-initial-exec-local.s | 2 +- deps/lld/test/ELF/tls-opt-gdie.s | 2 +- deps/lld/test/ELF/tls-opt-gdiele-i686.s | 2 +- deps/lld/test/ELF/tls-opt-iele-i686-nopic.s | 2 +- deps/lld/test/ELF/tls-static.s | 16 +- deps/lld/test/ELF/tls-two-relocs.s | 2 +- deps/lld/test/ELF/trace-symbols.s | 14 +- deps/lld/test/ELF/typed-undef.s | 11 + deps/lld/test/ELF/undef-broken-debug.test | 47 + deps/lld/test/ELF/undef-version-script.s | 6 +- deps/lld/test/ELF/unresolved-symbols.s | 3 + deps/lld/test/ELF/verdef-defaultver.s | 4 +- deps/lld/test/ELF/verdef.s | 6 +- deps/lld/test/ELF/verneed-as-needed-weak.s | 6 +- deps/lld/test/ELF/verneed-local.s | 6 +- deps/lld/test/ELF/verneed.s | 8 +- deps/lld/test/ELF/version-script-err.s | 1 - deps/lld/test/ELF/version-script-extern.s | 2 +- deps/lld/test/ELF/version-script-twice.s | 4 + deps/lld/test/ELF/version-script.s | 10 +- deps/lld/test/ELF/weak-entry.s | 13 + deps/lld/test/ELF/weak-undef-export.s | 31 + deps/lld/test/ELF/weak-undef-lazy.s | 11 + deps/lld/test/ELF/weak-undef-rw.s | 12 + deps/lld/test/ELF/weak-undef-val.s | 26 + deps/lld/test/ELF/weak-undef.s | 12 + deps/lld/test/ELF/wrap-no-real.s | 77 + deps/lld/test/ELF/wrap.s | 34 +- deps/lld/test/ELF/writable-sec-plt-reloc.s | 14 + deps/lld/test/ELF/x86-64-dyn-rel-error.s | 6 +- deps/lld/test/ELF/x86-64-dyn-rel-error2.s | 4 +- deps/lld/test/ELF/x86-64-relax-got-abs.s | 2 +- deps/lld/test/ELF/x86-64-reloc-16.s | 2 +- deps/lld/test/ELF/x86-64-reloc-8.s | 2 +- deps/lld/test/ELF/x86-64-reloc-error.s | 4 +- deps/lld/test/ELF/x86-64-reloc-range.s | 2 +- deps/lld/test/ELF/x86-64-tls-gd-local.s | 2 +- deps/lld/test/ELF/znotext-copy-relocation.s | 16 + .../ELF/znotext-plt-relocations-protected.s | 11 + deps/lld/test/ELF/znotext-plt-relocations.s | 20 + deps/lld/test/ELF/znotext-weak-undef.s | 16 + deps/lld/test/MinGW/driver.test | 126 + deps/lld/test/MinGW/lib.test | 21 + deps/lld/test/Unit/{lit.cfg => lit.cfg.py} | 18 +- .../{lit.site.cfg.in => lit.site.cfg.py.in} | 4 +- deps/lld/test/lit.cfg | 270 -- deps/lld/test/lit.cfg.py | 93 + .../{lit.site.cfg.in => lit.site.cfg.py.in} | 5 +- deps/lld/test/wasm/Inputs/archive1.ll | 7 + deps/lld/test/wasm/Inputs/archive2.ll | 7 + deps/lld/test/wasm/Inputs/call-indirect.ll | 17 + deps/lld/test/wasm/Inputs/global-ctor-dtor.ll | 14 + deps/lld/test/wasm/Inputs/hello.ll | 15 + deps/lld/test/wasm/Inputs/hidden.ll | 11 + deps/lld/test/wasm/Inputs/many-funcs.ll | 776 +++++ deps/lld/test/wasm/Inputs/ret32.ll | 6 + deps/lld/test/wasm/Inputs/ret64.ll | 4 + deps/lld/test/wasm/Inputs/weak-alias.ll | 37 + deps/lld/test/wasm/Inputs/weak-symbol1.ll | 11 + deps/lld/test/wasm/Inputs/weak-symbol2.ll | 11 + deps/lld/test/wasm/archive.ll | 31 + deps/lld/test/wasm/call-indirect.ll | 132 + deps/lld/test/wasm/conflict.test | 6 + deps/lld/test/wasm/data-layout.ll | 61 + deps/lld/test/wasm/entry.ll | 19 + deps/lld/test/wasm/function-imports-first.ll | 42 + deps/lld/test/wasm/function-imports.ll | 37 + deps/lld/test/wasm/function-index.test | 18 + deps/lld/test/wasm/import-memory.test | 13 + deps/lld/test/wasm/init-fini.ll | 99 + deps/lld/test/wasm/invalid-stack-size.test | 9 + deps/lld/test/wasm/lit.local.cfg | 4 + deps/lld/test/wasm/load-undefined.ll | 38 + deps/lld/test/wasm/local-symbols.ll | 78 + deps/lld/test/wasm/many-functions.ll | 695 +++++ deps/lld/test/wasm/relocatable.ll | 194 ++ deps/lld/test/wasm/signature-mismatch.ll | 16 + deps/lld/test/wasm/stack-pointer.ll | 64 + deps/lld/test/wasm/strip-debug.test | 6 + deps/lld/test/wasm/symbol-type-mismatch.ll | 9 + deps/lld/test/wasm/undefined-entry.test | 4 + deps/lld/test/wasm/undefined.ll | 20 + deps/lld/test/wasm/version.ll | 13 + deps/lld/test/wasm/visibility-hidden.ll | 46 + deps/lld/test/wasm/weak-alias-overide.ll | 123 + deps/lld/test/wasm/weak-alias.ll | 113 + deps/lld/test/wasm/weak-external.ll | 86 + deps/lld/test/wasm/weak-symbols.ll | 100 + deps/lld/tools/lld/CMakeLists.txt | 7 +- deps/lld/tools/lld/lld.cpp | 20 +- deps/lld/unittests/DriverTests/CMakeLists.txt | 1 + .../DriverTests/DarwinLdDriverTest.cpp | 2 +- deps/lld/unittests/MachOTests/CMakeLists.txt | 1 + deps/lld/utils/benchmark.py | 135 + deps/lld/utils/link.yaml | 39 + deps/lld/wasm/CMakeLists.txt | 26 + deps/lld/wasm/Config.h | 51 + deps/lld/wasm/Driver.cpp | 321 ++ deps/lld/wasm/InputFiles.cpp | 312 ++ deps/lld/wasm/InputFiles.h | 153 + deps/lld/wasm/InputSegment.cpp | 25 + deps/lld/wasm/InputSegment.h | 76 + deps/lld/wasm/Options.td | 103 + deps/lld/wasm/OutputSections.cpp | 348 +++ deps/lld/wasm/OutputSections.h | 136 + deps/lld/wasm/OutputSegment.h | 56 + deps/lld/wasm/SymbolTable.cpp | 237 ++ deps/lld/wasm/SymbolTable.h | 71 + deps/lld/wasm/Symbols.cpp | 114 + deps/lld/wasm/Symbols.h | 128 + deps/lld/wasm/Writer.cpp | 745 +++++ deps/lld/wasm/Writer.h | 21 + deps/lld/wasm/WriterUtils.cpp | 215 ++ deps/lld/wasm/WriterUtils.h | 78 + 852 files changed, 37365 insertions(+), 9800 deletions(-) create mode 100644 deps/lld-prebuilt/MinGW/Options.inc rename deps/lld-prebuilt/lld/{Config => Common}/Version.inc (50%) create mode 100644 deps/lld-prebuilt/wasm/Options.inc delete mode 100644 deps/lld/COFF/Error.cpp delete mode 100644 deps/lld/COFF/Error.h delete mode 100644 deps/lld/COFF/Memory.h create mode 100644 deps/lld/COFF/MinGW.cpp create mode 100644 deps/lld/COFF/MinGW.h create mode 100644 deps/lld/Common/Args.cpp create mode 100644 deps/lld/Common/CMakeLists.txt rename deps/lld/{ELF/Error.cpp => Common/ErrorHandler.cpp} (62%) create mode 100644 deps/lld/Common/Memory.cpp rename deps/lld/{lib/Core => Common}/Reproduce.cpp (83%) create mode 100644 deps/lld/Common/Strings.cpp rename deps/lld/{lib/Core => Common}/TargetOptionsCommandFlags.cpp (74%) create mode 100644 deps/lld/Common/Threads.cpp rename deps/lld/{lib/Config => Common}/Version.cpp (93%) create mode 100644 deps/lld/ELF/AArch64ErrataFix.cpp create mode 100644 deps/lld/ELF/AArch64ErrataFix.h create mode 100644 deps/lld/ELF/Bits.h delete mode 100644 deps/lld/ELF/Error.h create mode 100644 deps/lld/MinGW/CMakeLists.txt create mode 100644 deps/lld/MinGW/Driver.cpp create mode 100644 deps/lld/MinGW/Options.td create mode 100644 deps/lld/docs/WebAssembly.rst create mode 100644 deps/lld/include/lld/Common/Args.h rename deps/lld/include/lld/{Driver => Common}/Driver.h (66%) create mode 100644 deps/lld/include/lld/Common/ErrorHandler.h rename deps/lld/include/lld/{Core => Common}/LLVM.h (97%) rename deps/lld/{ELF => include/lld/Common}/Memory.h (87%) rename deps/lld/include/lld/{Core => Common}/Reproduce.h (87%) create mode 100644 deps/lld/include/lld/Common/Strings.h rename deps/lld/include/lld/{Core => Common}/TargetOptionsCommandFlags.h (86%) rename deps/lld/{ELF => include/lld/Common}/Threads.h (88%) rename deps/lld/include/lld/{Config => Common}/Version.h (86%) rename deps/lld/include/lld/{Config => Common}/Version.inc.in (100%) delete mode 100644 deps/lld/lib/Config/CMakeLists.txt create mode 100644 deps/lld/test/COFF/Inputs/alpha.ll create mode 100644 deps/lld/test/COFF/Inputs/beta.ll create mode 100644 deps/lld/test/COFF/Inputs/except_handler3.lib create mode 100644 deps/lld/test/COFF/Inputs/far-arm-thumb-abs20.s create mode 100644 deps/lld/test/COFF/Inputs/gamma.ll create mode 100644 deps/lld/test/COFF/Inputs/library2-arm64.lib create mode 100644 deps/lld/test/COFF/Inputs/library2.def create mode 100644 deps/lld/test/COFF/Inputs/locally-imported-def.s create mode 100644 deps/lld/test/COFF/Inputs/locally-imported-imp.s create mode 100644 deps/lld/test/COFF/Inputs/lto-cache.ll create mode 100644 deps/lld/test/COFF/Inputs/pdb-globals.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb-hashes-1.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb-hashes-2-missing.yaml create mode 100644 deps/lld/test/COFF/Inputs/pdb-hashes-2.yaml create mode 100644 deps/lld/test/COFF/arm-thumb-branch20-error.s create mode 100644 deps/lld/test/COFF/arm64-dynamicbase.s create mode 100644 deps/lld/test/COFF/arm64-import2.test create mode 100644 deps/lld/test/COFF/armnt-dynamicbase.test create mode 100644 deps/lld/test/COFF/common-alignment.test create mode 100644 deps/lld/test/COFF/ctors_dtors_priority.s create mode 100644 deps/lld/test/COFF/debug-dwarf.test create mode 100644 deps/lld/test/COFF/delayimports-armnt.yaml create mode 100644 deps/lld/test/COFF/dllexport-mingw.s create mode 100644 deps/lld/test/COFF/duplicate.test create mode 100644 deps/lld/test/COFF/entry-drectve.test create mode 100644 deps/lld/test/COFF/export-all.s create mode 100644 deps/lld/test/COFF/export-arm64.yaml create mode 100644 deps/lld/test/COFF/export-armnt.yaml create mode 100644 deps/lld/test/COFF/filename-casing.s create mode 100644 deps/lld/test/COFF/icf-executable.s create mode 100644 deps/lld/test/COFF/icf-xdata.s create mode 100644 deps/lld/test/COFF/ignore4217.yaml create mode 100644 deps/lld/test/COFF/linkrepro-manifest.test create mode 100644 deps/lld/test/COFF/linkrepro-pdb.test create mode 100644 deps/lld/test/COFF/linkrepro-res.test create mode 100644 deps/lld/test/COFF/locally-imported-arm64.test create mode 100644 deps/lld/test/COFF/locally-imported-warn-multiple.s create mode 100644 deps/lld/test/COFF/lto-cache.ll create mode 100644 deps/lld/test/COFF/lto-reloc-model.ll create mode 100644 deps/lld/test/COFF/manifestinput-error.test create mode 100644 deps/lld/test/COFF/manifestinput-nowarning.test delete mode 100644 deps/lld/test/COFF/nopdb.test create mode 100644 deps/lld/test/COFF/pdata-arm64.yaml create mode 100644 deps/lld/test/COFF/pdb-global-hashes.test create mode 100644 deps/lld/test/COFF/pdb-globals.test create mode 100644 deps/lld/test/COFF/pdb-heapsite.yaml create mode 100644 deps/lld/test/COFF/pdb-procid-remapping.test create mode 100644 deps/lld/test/COFF/pdb-publics-import.test create mode 100644 deps/lld/test/COFF/pdb-same-name.test create mode 100644 deps/lld/test/COFF/pdb-thunk.yaml create mode 100644 deps/lld/test/COFF/reloc-discarded-early.s create mode 100644 deps/lld/test/COFF/reloc-discarded-early2.s create mode 100644 deps/lld/test/COFF/safeseh-md.s create mode 100644 deps/lld/test/COFF/section-size.s create mode 100644 deps/lld/test/COFF/seh-comdat.test create mode 100644 deps/lld/test/COFF/strtab-size.s create mode 100644 deps/lld/test/COFF/subsystem-drectve.test create mode 100644 deps/lld/test/COFF/wholearchive.s create mode 100644 deps/lld/test/COFF/wx.s create mode 100644 deps/lld/test/ELF/Inputs/amdgpu-kernel-0.s create mode 100644 deps/lld/test/ELF/Inputs/amdgpu-kernel-1.s create mode 100644 deps/lld/test/ELF/Inputs/amdgpu-kernel-2.o create mode 100644 deps/lld/test/ELF/Inputs/compress-debug.s create mode 100644 deps/lld/test/ELF/Inputs/copy-rel-abs.s create mode 100644 deps/lld/test/ELF/Inputs/copy-rel-large.s create mode 100644 deps/lld/test/ELF/Inputs/corrupt-version-reference.so create mode 100644 deps/lld/test/ELF/Inputs/dynamic-list-weak-archive.s create mode 100644 deps/lld/test/ELF/Inputs/eh-frame.s create mode 100644 deps/lld/test/ELF/Inputs/gc-sections-shared.s create mode 100644 deps/lld/test/ELF/Inputs/gc-sections-shared2.s create mode 100755 deps/lld/test/ELF/Inputs/local-symbol-in-dso.so create mode 100644 deps/lld/test/ELF/Inputs/map-file5.s create mode 100644 deps/lld/test/ELF/Inputs/mips-micro.s create mode 100644 deps/lld/test/ELF/Inputs/shlib-undefined-ref.s create mode 100644 deps/lld/test/ELF/Inputs/undefined-error.s delete mode 100755 deps/lld/test/ELF/Inputs/verneed.so.sh create mode 100644 deps/lld/test/ELF/Inputs/verneed1.s delete mode 100755 deps/lld/test/ELF/Inputs/verneed1.so create mode 100644 deps/lld/test/ELF/Inputs/verneed2.s delete mode 100755 deps/lld/test/ELF/Inputs/verneed2.so create mode 100644 deps/lld/test/ELF/Inputs/weak-undef-lazy.s create mode 100644 deps/lld/test/ELF/Inputs/wrap-no-real.s create mode 100644 deps/lld/test/ELF/Inputs/wrap-no-real2.s create mode 100644 deps/lld/test/ELF/Inputs/writable-sec-plt-reloc.s create mode 100644 deps/lld/test/ELF/Inputs/znotext-copy-relocations.s create mode 100644 deps/lld/test/ELF/Inputs/znotext-plt-relocations-protected.s create mode 100644 deps/lld/test/ELF/Inputs/znotext-plt-relocations.s delete mode 100644 deps/lld/test/ELF/aarch64-call26-error.s create mode 100644 deps/lld/test/ELF/aarch64-call26-thunk.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-address.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-cli.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-large.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-nopatch.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-recognize.s create mode 100644 deps/lld/test/ELF/aarch64-cortex-a53-843419-thunk.s delete mode 100644 deps/lld/test/ELF/aarch64-jump26-error.s create mode 100644 deps/lld/test/ELF/aarch64-jump26-thunk.s create mode 100644 deps/lld/test/ELF/aarch64-ldprel-lo19-invalid.s create mode 100644 deps/lld/test/ELF/aarch64-lo12-alignment.s create mode 100644 deps/lld/test/ELF/aarch64-load-alignment.s create mode 100644 deps/lld/test/ELF/aarch64-thunk-pi.s create mode 100644 deps/lld/test/ELF/aarch64-thunk-script.s create mode 100644 deps/lld/test/ELF/aarch64-thunk-section-location.s create mode 100644 deps/lld/test/ELF/amdgpu-elf-flags-err.s create mode 100644 deps/lld/test/ELF/amdgpu-elf-flags.s create mode 100644 deps/lld/test/ELF/arm-bl-v6.s create mode 100644 deps/lld/test/ELF/arm-blx-v4t.s delete mode 100644 deps/lld/test/ELF/arm-branch-error.s create mode 100644 deps/lld/test/ELF/arm-branch-rangethunk.s create mode 100644 deps/lld/test/ELF/arm-branch-undef-weak-plt-thunk.s create mode 100644 deps/lld/test/ELF/arm-exidx-dedup-and-sentinel.s create mode 100644 deps/lld/test/ELF/arm-exidx-dedup.s delete mode 100644 deps/lld/test/ELF/arm-thumb-branch-error.s create mode 100644 deps/lld/test/ELF/arm-thumb-branch-rangethunk.s create mode 100644 deps/lld/test/ELF/arm-thumb-condbranch-thunk.s create mode 100644 deps/lld/test/ELF/arm-thumb-mix-range-thunk-os.s create mode 100644 deps/lld/test/ELF/arm-thumb-plt-range-thunk-os.s create mode 100644 deps/lld/test/ELF/arm-thumb-range-thunk-os.s create mode 100644 deps/lld/test/ELF/arm-thumb-thunk-empty-pass.s create mode 100644 deps/lld/test/ELF/arm-thunk-edgecase.s create mode 100644 deps/lld/test/ELF/arm-thunk-largesection.s create mode 100644 deps/lld/test/ELF/arm-thunk-linkerscript-dotexpr.s create mode 100644 deps/lld/test/ELF/arm-thunk-linkerscript-large.s create mode 100644 deps/lld/test/ELF/arm-thunk-linkerscript-orphan.s create mode 100644 deps/lld/test/ELF/arm-thunk-linkerscript-sort.s create mode 100644 deps/lld/test/ELF/arm-thunk-linkerscript.s create mode 100644 deps/lld/test/ELF/arm-thunk-multipass.s create mode 100644 deps/lld/test/ELF/arm-thunk-re-add.s create mode 100644 deps/lld/test/ELF/arm-thunk-toolargesection.s create mode 100644 deps/lld/test/ELF/assignment-archive.s create mode 100644 deps/lld/test/ELF/chroot.s create mode 100644 deps/lld/test/ELF/common-gc.s create mode 100644 deps/lld/test/ELF/common-gc2.s create mode 100644 deps/lld/test/ELF/common-gc3.s create mode 100644 deps/lld/test/ELF/compress-debug-sections-reloc.s create mode 100644 deps/lld/test/ELF/compressed-debug-conflict.s create mode 100644 deps/lld/test/ELF/conflict-debug-variable.s create mode 100644 deps/lld/test/ELF/conflict-debug-variable2.s create mode 100644 deps/lld/test/ELF/copy-rel-abs.s create mode 100644 deps/lld/test/ELF/copy-rel-large.s create mode 100644 deps/lld/test/ELF/corrupted-version-reference.s create mode 100644 deps/lld/test/ELF/defsym-dynamic.s create mode 100644 deps/lld/test/ELF/dynamic-list-empty.s create mode 100644 deps/lld/test/ELF/dynamic-list-preempt.s create mode 100644 deps/lld/test/ELF/dynamic-list-weak-archive.s create mode 100644 deps/lld/test/ELF/dynamic-list-wildcard.s create mode 100644 deps/lld/test/ELF/dynamic-no-rosegment.s create mode 100644 deps/lld/test/ELF/dynstr-no-rosegment.s create mode 100644 deps/lld/test/ELF/dynsym-no-rosegment.s create mode 100644 deps/lld/test/ELF/edata-no-bss.s create mode 100644 deps/lld/test/ELF/eh-frame-hdr-icf-fde.s create mode 100644 deps/lld/test/ELF/eh-frame.s create mode 100644 deps/lld/test/ELF/emit-relocs-gc.s create mode 100644 deps/lld/test/ELF/emit-relocs-mergeable-i386.s create mode 100644 deps/lld/test/ELF/emit-relocs-mergeable.s create mode 100644 deps/lld/test/ELF/executable-undefined-ignoreall.s create mode 100644 deps/lld/test/ELF/executable-undefined-protected-ignoreall.s create mode 100644 deps/lld/test/ELF/file-access.s create mode 100644 deps/lld/test/ELF/fill-trap.s create mode 100644 deps/lld/test/ELF/format-binary-non-ascii.s create mode 100644 deps/lld/test/ELF/gc-collect-undefined.s create mode 100644 deps/lld/test/ELF/gc-sections-linker-defined-symbol.s create mode 100644 deps/lld/test/ELF/gc-sections-undefined.s create mode 100644 deps/lld/test/ELF/gdb-index-base-addr.s create mode 100644 deps/lld/test/ELF/gdb-index-noranges.s create mode 100644 deps/lld/test/ELF/gdb-index-tls.s create mode 100644 deps/lld/test/ELF/gnu-hash-table-copy.s create mode 100644 deps/lld/test/ELF/gnu-hash-table-many.s create mode 100644 deps/lld/test/ELF/gnu-hash-table-rwsegment.s create mode 100644 deps/lld/test/ELF/gnu-ifunc-dynsym.s create mode 100644 deps/lld/test/ELF/gnu-ifunc-dyntags.s create mode 100644 deps/lld/test/ELF/got32-i386-pie-rw.s create mode 100644 deps/lld/test/ELF/help.s create mode 100644 deps/lld/test/ELF/i386-debug-noabs.test create mode 100644 deps/lld/test/ELF/i386-got-value.s create mode 100644 deps/lld/test/ELF/i386-tls-initial-exec-local.s create mode 100644 deps/lld/test/ELF/icf-symbol-type.s create mode 100644 deps/lld/test/ELF/invalid-local-symbol-in-dso.s create mode 100644 deps/lld/test/ELF/invalid-undef-section-symbol.test delete mode 100644 deps/lld/test/ELF/invalid/Inputs/section-index2.elf create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/common-filespec1.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/common-filespec2.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/copy-rel-symbol-value.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/provide-shared.s create mode 100644 deps/lld/test/ELF/linkerscript/Inputs/symbol-reserved.script create mode 100644 deps/lld/test/ELF/linkerscript/absolute2.s create mode 100644 deps/lld/test/ELF/linkerscript/align-section-offset.s create mode 100644 deps/lld/test/ELF/linkerscript/align-section.s create mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-order.s create mode 100644 deps/lld/test/ELF/linkerscript/arm-exidx-sentinel-and-assignment.s create mode 100644 deps/lld/test/ELF/linkerscript/common-exclude.s create mode 100644 deps/lld/test/ELF/linkerscript/common-filespec.s create mode 100644 deps/lld/test/ELF/linkerscript/compress-debug-sections-custom.s create mode 100644 deps/lld/test/ELF/linkerscript/copy-rel-symbol-value-err.s create mode 100644 deps/lld/test/ELF/linkerscript/copy-rel-symbol-value.s create mode 100644 deps/lld/test/ELF/linkerscript/emit-reloc-section-names.s create mode 100644 deps/lld/test/ELF/linkerscript/header-phdr.s create mode 100644 deps/lld/test/ELF/linkerscript/image-base.s create mode 100644 deps/lld/test/ELF/linkerscript/include-cycle.s create mode 100644 deps/lld/test/ELF/linkerscript/linker-script-in-search-path.s create mode 100644 deps/lld/test/ELF/linkerscript/memory-at.s create mode 100644 deps/lld/test/ELF/linkerscript/memory-err.s create mode 100644 deps/lld/test/ELF/linkerscript/memory2.s create mode 100644 deps/lld/test/ELF/linkerscript/memory3.s create mode 100644 deps/lld/test/ELF/linkerscript/nobits-offset.s create mode 100644 deps/lld/test/ELF/linkerscript/orphan-discard.s create mode 100644 deps/lld/test/ELF/linkerscript/orphan-end.s create mode 100644 deps/lld/test/ELF/linkerscript/orphan-phdrs.s create mode 100644 deps/lld/test/ELF/linkerscript/orphan-report.s create mode 100644 deps/lld/test/ELF/linkerscript/provide-shared.s create mode 100644 deps/lld/test/ELF/linkerscript/region-alias.s create mode 100644 deps/lld/test/ELF/linkerscript/segment-headers.s create mode 100644 deps/lld/test/ELF/linkerscript/symbol-only-flags.s create mode 100644 deps/lld/test/ELF/linkerscript/symbol-ordering-file.s create mode 100644 deps/lld/test/ELF/linkerscript/thunk-gen-mips.s create mode 100644 deps/lld/test/ELF/linkerscript/version-linker-symbol.s create mode 100644 deps/lld/test/ELF/lto-plugin-ignore.s create mode 100644 deps/lld/test/ELF/lto/Inputs/data-ordering-lto.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll create mode 100644 deps/lld/test/ELF/lto/Inputs/symbol-ordering-lto.ll create mode 100644 deps/lld/test/ELF/lto/data-ordering-lto.s create mode 100644 deps/lld/test/ELF/lto/keep-undefined.ll create mode 100644 deps/lld/test/ELF/lto/linker-script-symbols-assign.ll create mode 100644 deps/lld/test/ELF/lto/linker-script-symbols-ipo.ll create mode 100644 deps/lld/test/ELF/lto/linker-script-symbols.ll create mode 100644 deps/lld/test/ELF/lto/relocatable.ll create mode 100644 deps/lld/test/ELF/lto/section-name.ll create mode 100644 deps/lld/test/ELF/lto/symbol-ordering-lto.s create mode 100644 deps/lld/test/ELF/merge-align.s create mode 100644 deps/lld/test/ELF/merge-entsize.s create mode 100644 deps/lld/test/ELF/mips-26-n32-n64.s create mode 100644 deps/lld/test/ELF/mips-got-page-script.s create mode 100644 deps/lld/test/ELF/mips-got-script.s create mode 100644 deps/lld/test/ELF/mips-micro-got.s create mode 100644 deps/lld/test/ELF/mips-micro-got64.s create mode 100644 deps/lld/test/ELF/mips-micro-jal.s create mode 100644 deps/lld/test/ELF/mips-micro-plt.s create mode 100644 deps/lld/test/ELF/mips-micro-relocs.s create mode 100644 deps/lld/test/ELF/mips-micro-thunks.s create mode 100644 deps/lld/test/ELF/mips-out-of-bounds-call16-reloc.s create mode 100644 deps/lld/test/ELF/pack-dyn-relocs.s create mode 100644 deps/lld/test/ELF/pr34660.s create mode 100644 deps/lld/test/ELF/pr34872.s create mode 100644 deps/lld/test/ELF/relocatable-comdat2.s create mode 100644 deps/lld/test/ELF/relocation-b-aarch64.test create mode 100644 deps/lld/test/ELF/relocation-size-err.s create mode 100644 deps/lld/test/ELF/relro-copyrel-bss-script.s create mode 100644 deps/lld/test/ELF/relro-non-contiguous-script-data.s create mode 100644 deps/lld/test/ELF/relro-non-contiguous.s create mode 100644 deps/lld/test/ELF/relro-script.s create mode 100644 deps/lld/test/ELF/shared-lazy.s create mode 100644 deps/lld/test/ELF/shlib-undefined-shared.s create mode 100644 deps/lld/test/ELF/silent-ignore.test create mode 100644 deps/lld/test/ELF/symbol-ordering-file2.s create mode 100644 deps/lld/test/ELF/sysv-hash-no-rosegment.s create mode 100644 deps/lld/test/ELF/typed-undef.s create mode 100644 deps/lld/test/ELF/undef-broken-debug.test create mode 100644 deps/lld/test/ELF/weak-entry.s create mode 100644 deps/lld/test/ELF/weak-undef-export.s create mode 100644 deps/lld/test/ELF/weak-undef-lazy.s create mode 100644 deps/lld/test/ELF/weak-undef-rw.s create mode 100644 deps/lld/test/ELF/weak-undef-val.s create mode 100644 deps/lld/test/ELF/wrap-no-real.s create mode 100644 deps/lld/test/ELF/writable-sec-plt-reloc.s create mode 100644 deps/lld/test/ELF/znotext-copy-relocation.s create mode 100644 deps/lld/test/ELF/znotext-plt-relocations-protected.s create mode 100644 deps/lld/test/ELF/znotext-plt-relocations.s create mode 100644 deps/lld/test/ELF/znotext-weak-undef.s create mode 100644 deps/lld/test/MinGW/driver.test create mode 100644 deps/lld/test/MinGW/lib.test rename deps/lld/test/Unit/{lit.cfg => lit.cfg.py} (51%) rename deps/lld/test/Unit/{lit.site.cfg.in => lit.site.cfg.py.in} (90%) delete mode 100644 deps/lld/test/lit.cfg create mode 100644 deps/lld/test/lit.cfg.py rename deps/lld/test/{lit.site.cfg.in => lit.site.cfg.py.in} (86%) create mode 100644 deps/lld/test/wasm/Inputs/archive1.ll create mode 100644 deps/lld/test/wasm/Inputs/archive2.ll create mode 100644 deps/lld/test/wasm/Inputs/call-indirect.ll create mode 100644 deps/lld/test/wasm/Inputs/global-ctor-dtor.ll create mode 100644 deps/lld/test/wasm/Inputs/hello.ll create mode 100644 deps/lld/test/wasm/Inputs/hidden.ll create mode 100644 deps/lld/test/wasm/Inputs/many-funcs.ll create mode 100644 deps/lld/test/wasm/Inputs/ret32.ll create mode 100644 deps/lld/test/wasm/Inputs/ret64.ll create mode 100644 deps/lld/test/wasm/Inputs/weak-alias.ll create mode 100644 deps/lld/test/wasm/Inputs/weak-symbol1.ll create mode 100644 deps/lld/test/wasm/Inputs/weak-symbol2.ll create mode 100644 deps/lld/test/wasm/archive.ll create mode 100644 deps/lld/test/wasm/call-indirect.ll create mode 100644 deps/lld/test/wasm/conflict.test create mode 100644 deps/lld/test/wasm/data-layout.ll create mode 100644 deps/lld/test/wasm/entry.ll create mode 100644 deps/lld/test/wasm/function-imports-first.ll create mode 100644 deps/lld/test/wasm/function-imports.ll create mode 100644 deps/lld/test/wasm/function-index.test create mode 100644 deps/lld/test/wasm/import-memory.test create mode 100644 deps/lld/test/wasm/init-fini.ll create mode 100644 deps/lld/test/wasm/invalid-stack-size.test create mode 100644 deps/lld/test/wasm/lit.local.cfg create mode 100644 deps/lld/test/wasm/load-undefined.ll create mode 100644 deps/lld/test/wasm/local-symbols.ll create mode 100644 deps/lld/test/wasm/many-functions.ll create mode 100644 deps/lld/test/wasm/relocatable.ll create mode 100644 deps/lld/test/wasm/signature-mismatch.ll create mode 100644 deps/lld/test/wasm/stack-pointer.ll create mode 100644 deps/lld/test/wasm/strip-debug.test create mode 100644 deps/lld/test/wasm/symbol-type-mismatch.ll create mode 100644 deps/lld/test/wasm/undefined-entry.test create mode 100644 deps/lld/test/wasm/undefined.ll create mode 100644 deps/lld/test/wasm/version.ll create mode 100644 deps/lld/test/wasm/visibility-hidden.ll create mode 100644 deps/lld/test/wasm/weak-alias-overide.ll create mode 100644 deps/lld/test/wasm/weak-alias.ll create mode 100644 deps/lld/test/wasm/weak-external.ll create mode 100644 deps/lld/test/wasm/weak-symbols.ll create mode 100755 deps/lld/utils/benchmark.py create mode 100644 deps/lld/utils/link.yaml create mode 100644 deps/lld/wasm/CMakeLists.txt create mode 100644 deps/lld/wasm/Config.h create mode 100644 deps/lld/wasm/Driver.cpp create mode 100644 deps/lld/wasm/InputFiles.cpp create mode 100644 deps/lld/wasm/InputFiles.h create mode 100644 deps/lld/wasm/InputSegment.cpp create mode 100644 deps/lld/wasm/InputSegment.h create mode 100644 deps/lld/wasm/Options.td create mode 100644 deps/lld/wasm/OutputSections.cpp create mode 100644 deps/lld/wasm/OutputSections.h create mode 100644 deps/lld/wasm/OutputSegment.h create mode 100644 deps/lld/wasm/SymbolTable.cpp create mode 100644 deps/lld/wasm/SymbolTable.h create mode 100644 deps/lld/wasm/Symbols.cpp create mode 100644 deps/lld/wasm/Symbols.h create mode 100644 deps/lld/wasm/Writer.cpp create mode 100644 deps/lld/wasm/Writer.h create mode 100644 deps/lld/wasm/WriterUtils.cpp create mode 100644 deps/lld/wasm/WriterUtils.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fd39dd30da..95796385ca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,97 +64,118 @@ else() include_directories(${LLVM_INCLUDE_DIRS}) include_directories(${CLANG_INCLUDE_DIRS}) set(EMBEDDED_LLD_LIB_SOURCES - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Config/Version.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/LayoutPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ObjCPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/TLVPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/GOTPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ShimPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/WriterMachO.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/StubsPass.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/FileArchive.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/TargetOptionsCommandFlags.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/File.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Error.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/SymbolTable.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reader.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reproduce.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Writer.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/LinkingContext.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Resolver.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Args.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/ErrorHandler.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Memory.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Reproduce.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Strings.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/TargetOptionsCommandFlags.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Threads.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/Common/Version.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/DefinedAtom.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Error.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/File.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/LinkingContext.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Reader.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Resolver.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/SymbolTable.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Core/Writer.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/Driver/DarwinLdDriver.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/FileArchive.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/CompactUnwindPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/GOTPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/LayoutPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ObjCPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/ShimPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/StubsPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/TLVPass.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/MachO/WriterMachO.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp" ) set(EMBEDDED_LLD_ELF_SOURCES - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptLexer.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/AArch64ErrataFix.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AArch64.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AMDGPU.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/ARM.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AVR.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/SPARCV9.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/Mips.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/AArch64.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86_64.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC64.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/MipsArchTree.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/PPC64.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/SPARCV9.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/GdbIndex.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Arch/X86_64.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Driver.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Relocations.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Error.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LTO.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Strings.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptParser.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/MarkLive.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SyntheticSections.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SymbolTable.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LinkerScript.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/DriverUtils.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/EhFrame.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Target.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Filesystem.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/OutputSections.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Symbols.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/GdbIndex.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ICF.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputFiles.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Thunks.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/DriverUtils.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Writer.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/InputSection.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LTO.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/LinkerScript.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/ELF/MapFile.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/MarkLive.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/OutputSections.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Relocations.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptLexer.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/ScriptParser.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Strings.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SymbolTable.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Symbols.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/SyntheticSections.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Target.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Thunks.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/ELF/Writer.cpp" ) + set(EMBEDDED_LLD_COFF_SOURCES + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Chunks.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/COFF/DLL.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Driver.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Chunks.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/PDB.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Error.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/LTO.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Strings.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MarkLive.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/SymbolTable.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Symbols.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/DriverUtils.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/COFF/ICF.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/COFF/InputFiles.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/DriverUtils.cpp" - "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Writer.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/LTO.cpp" "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MapFile.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MarkLive.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/MinGW.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/PDB.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Strings.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/SymbolTable.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Symbols.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/COFF/Writer.cpp" + ) + set(EMBEDDED_LLD_MINGW_SOURCES + "${CMAKE_SOURCE_DIR}/deps/lld/MinGW/Driver.cpp" + ) + set(EMBEDDED_LLD_WASM_SOURCES + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/Driver.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/InputFiles.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/InputSegment.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/OutputSections.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/Symbols.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/SymbolTable.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/Writer.cpp" + "${CMAKE_SOURCE_DIR}/deps/lld/wasm/WriterUtils.cpp" ) add_library(embedded_lld_lib ${EMBEDDED_LLD_LIB_SOURCES}) add_library(embedded_lld_elf ${EMBEDDED_LLD_ELF_SOURCES}) add_library(embedded_lld_coff ${EMBEDDED_LLD_COFF_SOURCES}) + add_library(embedded_lld_mingw ${EMBEDDED_LLD_MINGW_SOURCES}) + add_library(embedded_lld_wasm ${EMBEDDED_LLD_WASM_SOURCES}) if(MSVC) set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS /w") else() @@ -172,6 +193,14 @@ else() COMPILE_FLAGS ${ZIG_LLD_COMPILE_FLAGS} LINK_FLAGS " " ) + set_target_properties(embedded_lld_mingw PROPERTIES + COMPILE_FLAGS ${ZIG_LLD_COMPILE_FLAGS} + LINK_FLAGS " " + ) + set_target_properties(embedded_lld_wasm PROPERTIES + COMPILE_FLAGS ${ZIG_LLD_COMPILE_FLAGS} + LINK_FLAGS " " + ) target_include_directories(embedded_lld_lib PUBLIC "${CMAKE_SOURCE_DIR}/deps/lld/include" "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt" @@ -188,13 +217,27 @@ else() "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/COFF" "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt" ) + target_include_directories(embedded_lld_mingw PUBLIC + "${CMAKE_SOURCE_DIR}/deps/lld/MinGW" + "${CMAKE_SOURCE_DIR}/deps/lld/include" + "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/MinGW" + "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt" + ) + target_include_directories(embedded_lld_wasm PUBLIC + "${CMAKE_SOURCE_DIR}/deps/lld/wasm" + "${CMAKE_SOURCE_DIR}/deps/lld/include" + "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt/wasm" + "${CMAKE_SOURCE_DIR}/deps/lld-prebuilt" + ) set(LLD_INCLUDE_DIRS "") set(LLD_LIBRARIES embedded_lld_elf embedded_lld_coff + embedded_lld_mingw + embedded_lld_wasm embedded_lld_lib ) - install(TARGETS embedded_lld_elf embedded_lld_coff embedded_lld_lib DESTINATION "${ZIG_CPP_LIB_DIR}") + install(TARGETS embedded_lld_elf embedded_lld_coff embedded_lld_mingw embedded_lld_wasm embedded_lld_lib DESTINATION "${ZIG_CPP_LIB_DIR}") endif() # No patches have been applied to SoftFloat-3d diff --git a/deps/lld-prebuilt/COFF/Options.inc b/deps/lld-prebuilt/COFF/Options.inc index a2a0f3f892..b5414ffa0b 100644 --- a/deps/lld-prebuilt/COFF/Options.inc +++ b/deps/lld-prebuilt/COFF/Options.inc @@ -12,9 +12,10 @@ #ifdef PREFIX #define COMMA , PREFIX(prefix_0, {nullptr}) +PREFIX(prefix_3, {"--" COMMA nullptr}) PREFIX(prefix_2, {"/" COMMA "-" COMMA nullptr}) PREFIX(prefix_1, {"/" COMMA "-" COMMA "-?" COMMA nullptr}) -PREFIX(prefix_3, {"/?" COMMA "-?" COMMA nullptr}) +PREFIX(prefix_4, {"/?" COMMA "-?" COMMA nullptr}) #undef COMMA #endif // PREFIX @@ -30,19 +31,26 @@ OPTION(prefix_0, "", INPUT, Input, INVALID, INVALID, nullptr, 0, 0, nullp OPTION(prefix_0, "", UNKNOWN, Unknown, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "align:", align, Joined, INVALID, INVALID, nullptr, 0, 0, "Section alignment", nullptr, nullptr) +OPTION(prefix_1, "aligncomm:", aligncomm, Joined, INVALID, INVALID, nullptr, 0, 0, + "Set common symbol alignment", nullptr, nullptr) OPTION(prefix_1, "allowbind:no", allowbind_no, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable DLL binding", nullptr, nullptr) -OPTION(prefix_1, "allowbind", allowbind, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "allowbind", allowbind, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable DLL binding (default)", nullptr, nullptr) OPTION(prefix_1, "allowisolation:no", allowisolation_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Set NO_ISOLATION bit", nullptr, nullptr) -OPTION(prefix_1, "allowisolation", allowisolation, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Disable DLL isolation", nullptr, nullptr) +OPTION(prefix_1, "allowisolation", allowisolation, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable DLL isolation (default)", nullptr, nullptr) OPTION(prefix_1, "alternatename:", alternatename, Joined, INVALID, INVALID, nullptr, 0, 0, "Define weak alias", nullptr, nullptr) OPTION(prefix_1, "appcontainer:no", appcontainer_no, Flag, INVALID, INVALID, nullptr, 0, 0, + "Image can run outside an app container (default)", nullptr, nullptr) +OPTION(prefix_1, "appcontainer", appcontainer, Flag, INVALID, INVALID, nullptr, 0, 0, "Image can only be run in an app container", nullptr, nullptr) -OPTION(prefix_1, "appcontainer", appcontainer, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "base:", base, Joined, INVALID, INVALID, nullptr, 0, 0, "Base address of the program", nullptr, nullptr) +OPTION(prefix_1, "debug:dwarf", debug_dwarf, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "debug:ghash", debug_ghash, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "debugtype:", debugtype, Joined, INVALID, INVALID, nullptr, 0, 0, "Debug Info Options", nullptr, nullptr) OPTION(prefix_1, "debug", debug, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -60,22 +68,25 @@ OPTION(prefix_1, "dll", dll, Flag, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "driver:", driver, Joined, INVALID, INVALID, nullptr, 0, 0, "Generate a Windows NT Kernel Mode Driver", nullptr, nullptr) OPTION(prefix_1, "dynamicbase:no", dynamicbase_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Disable address space layout randomization", nullptr, nullptr) -OPTION(prefix_1, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Disable ASLR (default when /fixed)", nullptr, nullptr) +OPTION(prefix_1, "dynamicbase", dynamicbase, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable ASLR (default unless /fixed)", nullptr, nullptr) OPTION(prefix_1, "editandcontinue", editandcontinue, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "entry:", entry, Joined, INVALID, INVALID, nullptr, 0, 0, "Name of entry point symbol", nullptr, nullptr) OPTION(prefix_1, "errorlimit:", errorlimit, Joined, INVALID, INVALID, nullptr, 0, 0, "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr) OPTION(prefix_1, "errorreport:", errorreport, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "export-all-symbols", export_all_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "export:", export, Joined, INVALID, INVALID, nullptr, 0, 0, "Export a function", nullptr, nullptr) OPTION(prefix_1, "failifmismatch:", failifmismatch, Joined, INVALID, INVALID, nullptr, 0, 0, "", nullptr, nullptr) OPTION(prefix_1, "fastfail", fastfail, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "fixed:no", fixed_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Enable base relocations", nullptr, nullptr) -OPTION(prefix_1, "fixed", fixed, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Enable base relocations (default)", nullptr, nullptr) +OPTION(prefix_1, "fixed", fixed, Flag, INVALID, INVALID, nullptr, 0, 0, + "Disable base relocations", nullptr, nullptr) OPTION(prefix_1, "force:unresolved", force_unresolved, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "force", force, Flag, INVALID, INVALID, nullptr, 0, 0, "Allow undefined symbols when creating executables", nullptr, nullptr) @@ -85,10 +96,12 @@ OPTION(prefix_1, "heap:", heap, Joined, INVALID, INVALID, nullptr, 0, 0, "Size of the heap", nullptr, nullptr) OPTION(prefix_1, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "highentropyva:no", highentropyva_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Set HIGH_ENTROPY_VA bit", nullptr, nullptr) -OPTION(prefix_1, "highentropyva", highentropyva, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Disable 64-bit ASLR", nullptr, nullptr) +OPTION(prefix_1, "highentropyva", highentropyva, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable 64-bit ASLR (default on 64-bit)", nullptr, nullptr) OPTION(prefix_1, "idlout:", idlout, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "ignore:", ignore, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "ignore:", ignore, Joined, INVALID, INVALID, nullptr, 0, 0, + "Specify warning codes to ignore", nullptr, nullptr) OPTION(prefix_1, "ignoreidl", ignoreidl, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "implib:", implib, Joined, INVALID, INVALID, nullptr, 0, 0, "Import library name", nullptr, nullptr) @@ -97,14 +110,20 @@ OPTION(prefix_2, "include:", incl, Joined, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "incremental:no", no_incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "incremental", incremental, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "largeaddressaware:no", largeaddressaware_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Disable large addresses", nullptr, nullptr) -OPTION(prefix_1, "largeaddressaware", largeaddressaware, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Disable large addresses (default on 32-bit)", nullptr, nullptr) +OPTION(prefix_1, "largeaddressaware", largeaddressaware, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable large addresses (default on 64-bit)", nullptr, nullptr) OPTION(prefix_1, "libpath:", libpath, Joined, INVALID, INVALID, nullptr, 0, 0, "Additional library search path", nullptr, nullptr) OPTION(prefix_1, "linkrepro:", linkrepro, Joined, INVALID, INVALID, nullptr, 0, 0, "Dump linker invocation and input files for debugging", nullptr, nullptr) +OPTION(prefix_1, "lldltocache:", lldltocache, Joined, INVALID, INVALID, nullptr, 0, 0, + "Path to ThinLTO cached object file directory", nullptr, nullptr) +OPTION(prefix_1, "lldltocachepolicy:", lldltocachepolicy, Joined, INVALID, INVALID, nullptr, 0, 0, + "Pruning policy for the ThinLTO cache", nullptr, nullptr) OPTION(prefix_2, "lldmap:", lldmap_file, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "lldmap", lldmap, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "lldmingw", lldmingw, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "lldsavetemps", lldsavetemps, Flag, INVALID, INVALID, nullptr, 0, 0, "Save temporary files instead of deleting them", nullptr, nullptr) OPTION(prefix_1, "machine:", machine, Joined, INVALID, INVALID, nullptr, 0, 0, @@ -126,28 +145,31 @@ OPTION(prefix_1, "merge:", merge, Joined, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "mllvm:", mllvm, Joined, INVALID, INVALID, nullptr, 0, 0, "Options to pass to LLVM", nullptr, nullptr) OPTION(prefix_1, "msvclto", msvclto, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "natvis:", natvis, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "nodefaultlib:", nodefaultlib, Joined, INVALID, INVALID, nullptr, 0, 0, "Remove a default library", nullptr, nullptr) OPTION(prefix_1, "nodefaultlib", nodefaultlib_all, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "noentry", noentry, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "nologo", nologo, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "nopdb", nopdb, Flag, INVALID, INVALID, nullptr, 0, 0, - "Disable PDB generation for DWARF users", nullptr, nullptr) -OPTION(prefix_1, "nosymtab", nosymtab, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "nxcompat:no", nxcompat_no, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable data execution provention", nullptr, nullptr) -OPTION(prefix_1, "nxcompat", nxcompat, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "nxcompat", nxcompat, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable data execution prevention (default)", nullptr, nullptr) OPTION(prefix_1, "opt:", opt, Joined, INVALID, INVALID, nullptr, 0, 0, "Control optimizations", nullptr, nullptr) OPTION(prefix_1, "out:", out, Joined, INVALID, INVALID, nullptr, 0, 0, "Path to file to write output", nullptr, nullptr) +OPTION(prefix_2, "output-def:", output_def, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "pdb:", pdb, Joined, INVALID, INVALID, nullptr, 0, 0, "PDB file path", nullptr, nullptr) OPTION(prefix_1, "pdbaltpath:", pdbaltpath, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "profile", profile, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "rsp-quoting=", rsp_quoting, Joined, INVALID, INVALID, nullptr, 0, 0, + "Quoting style for response files, 'windows' (default) or 'posix'", nullptr, nullptr) OPTION(prefix_1, "safeseh:no", safeseh_no, Flag, INVALID, INVALID, nullptr, 0, 0, - "Produce an image with Safe Exception Handler", nullptr, nullptr) -OPTION(prefix_1, "safeseh", safeseh, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) + "Don't produce an image with Safe Exception Handler", nullptr, nullptr) +OPTION(prefix_1, "safeseh", safeseh, Flag, INVALID, INVALID, nullptr, 0, 0, + "Produce an image with Safe Exception Handler (only for x86)", nullptr, nullptr) OPTION(prefix_1, "section:", section, Joined, INVALID, INVALID, nullptr, 0, 0, "Specify section attributes", nullptr, nullptr) OPTION(prefix_1, "stack:", stack, Joined, INVALID, INVALID, nullptr, 0, 0, @@ -163,12 +185,27 @@ OPTION(prefix_1, "tlbid:", tlbid, Joined, INVALID, INVALID, nullptr, 0, 0, nullp OPTION(prefix_1, "tlbout:", tlbout, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "tsaware:no", tsaware_no, Flag, INVALID, INVALID, nullptr, 0, 0, "Create non-Terminal Server aware executable", nullptr, nullptr) -OPTION(prefix_1, "tsaware", tsaware, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "tsaware", tsaware, Flag, INVALID, INVALID, nullptr, 0, 0, + "Create Terminal Server aware executable (default)", nullptr, nullptr) OPTION(prefix_1, "verbose:", verbose_all, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "version:", version, Joined, INVALID, INVALID, nullptr, 0, 0, "Specify a version number in the PE header", nullptr, nullptr) -OPTION(prefix_1, "wx:no", wx_no, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "wx", wx, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_3, "", help_q, Flag, INVALID, help, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "version", dash_dash_version, Flag, INVALID, INVALID, nullptr, 0, 0, + "Print version information", nullptr, nullptr) +OPTION(prefix_1, "wholearchive:", wholearchive_file, Joined, INVALID, INVALID, nullptr, 0, 0, + "Include all object files from this archive", nullptr, nullptr) +OPTION(prefix_1, "wholearchive", wholearchive_flag, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "WX:no", WX_no, Flag, INVALID, INVALID, nullptr, 0, 0, + "Don't treat warnings as errors", nullptr, nullptr) +OPTION(prefix_1, "WX", WX, Flag, INVALID, INVALID, nullptr, 0, 0, + "Treat warnings as errors", nullptr, nullptr) +OPTION(prefix_4, "", help_q, Flag, INVALID, help, nullptr, 0, 0, nullptr, nullptr, nullptr) #endif // OPTION + +#ifdef OPTTABLE_ARG_INIT +////////// +// Option Values + + +#endif // OPTTABLE_ARG_INIT diff --git a/deps/lld-prebuilt/DarwinLdOptions.inc b/deps/lld-prebuilt/DarwinLdOptions.inc index c70eb2967c..dc4f3dec54 100644 --- a/deps/lld-prebuilt/DarwinLdOptions.inc +++ b/deps/lld-prebuilt/DarwinLdOptions.inc @@ -187,3 +187,10 @@ OPTION(prefix_1, "v", v, Flag, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_1, "Z", Z, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not search standard directories for libraries or frameworks", nullptr, nullptr) #endif // OPTION + +#ifdef OPTTABLE_ARG_INIT +////////// +// Option Values + + +#endif // OPTTABLE_ARG_INIT diff --git a/deps/lld-prebuilt/ELF/Options.inc b/deps/lld-prebuilt/ELF/Options.inc index 012841973b..640f1bdcc6 100644 --- a/deps/lld-prebuilt/ELF/Options.inc +++ b/deps/lld-prebuilt/ELF/Options.inc @@ -52,19 +52,23 @@ OPTION(prefix_2, "build-id", build_id, Flag, INVALID, INVALID, nullptr, 0, 0, "Generate build ID note", nullptr, nullptr) OPTION(prefix_2, "b", alias_format_b, Separate, INVALID, format, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "call_shared", alias_Bdynamic_call_shared, Flag, INVALID, Bdynamic, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "chroot", chroot, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "color-diagnostics=", color_diagnostics_eq, Joined, INVALID, INVALID, nullptr, 0, 0, "Use colors in diagnostics", nullptr, nullptr) OPTION(prefix_2, "color-diagnostics", color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, "Use colors in diagnostics", nullptr, nullptr) -OPTION(prefix_2, "compress-debug-sections=", compress_debug_sections, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "compress-debug-sections=", compress_debug_sections_eq, Joined, INVALID, compress_debug_sections, nullptr, 0, 0, "Compress DWARF debug sections", nullptr, nullptr) -OPTION(prefix_3, "cref", cref, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "compress-debug-sections", compress_debug_sections, Separate, INVALID, INVALID, nullptr, 0, 0, + "Compress DWARF debug sections", nullptr, nullptr) +OPTION(prefix_2, "cref", cref, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "dc", alias_define_common_dc, Flag, INVALID, define_common, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "define-common", define_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Assign space to common symbols", nullptr, nullptr) -OPTION(prefix_2, "defsym=", defsym, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "defsym=", defsym_eq, Joined, INVALID, defsym, nullptr, 0, 0, + "Define a symbol alias", nullptr, nullptr) +OPTION(prefix_2, "defsym", defsym, Separate, INVALID, INVALID, nullptr, 0, 0, "Define a symbol alias", nullptr, nullptr) -OPTION(prefix_2, "defsym", alias_defsym, Separate, INVALID, defsym, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "demangle", demangle, Flag, INVALID, INVALID, nullptr, 0, 0, "Demangle symbol names", nullptr, nullptr) OPTION(prefix_2, "detect-odr-violations", detect_odr_violations, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -81,7 +85,8 @@ OPTION(prefix_2, "dn", alias_Bstatic_dn, Flag, INVALID, Bstatic, nullptr, 0, 0, OPTION(prefix_2, "dp", alias_define_common_dp, Flag, INVALID, define_common, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "dynamic-linker", dynamic_linker, Separate, INVALID, INVALID, nullptr, 0, 0, "Which dynamic linker to use", nullptr, nullptr) -OPTION(prefix_2, "dynamic-list=", alias_dynamic_list, Joined, INVALID, dynamic_list, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "dynamic-list=", dynamic_list_eq, Joined, INVALID, dynamic_list, nullptr, 0, 0, + "Read a list of dynamic symbols", nullptr, nullptr) OPTION(prefix_2, "dynamic-list", dynamic_list, Separate, INVALID, INVALID, nullptr, 0, 0, "Read a list of dynamic symbols", nullptr, nullptr) OPTION(prefix_2, "dy", alias_Bdynamic_dy, Flag, INVALID, Bdynamic, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -97,18 +102,22 @@ OPTION(prefix_2, "enable-new-dtags", enable_new_dtags, Flag, INVALID, INVALID, n OPTION(prefix_2, "end-group", end_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "end-lib", end_lib, Flag, INVALID, INVALID, nullptr, 0, 0, "End a grouping of objects that should be treated as if they were together in an archive", nullptr, nullptr) -OPTION(prefix_2, "entry=", alias_entry_entry, Joined, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "entry=", entry_eq, Joined, INVALID, entry, nullptr, 0, 0, + "Name of entry point symbol", "", nullptr) OPTION(prefix_2, "entry", entry, Separate, INVALID, INVALID, nullptr, 0, 0, "Name of entry point symbol", "", nullptr) -OPTION(prefix_2, "error-limit=", alias_error_limit, Joined, INVALID, error_limit, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "error-limit=", error_limit_eq, Joined, INVALID, error_limit, nullptr, 0, 0, + "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr) OPTION(prefix_2, "error-limit", error_limit, Separate, INVALID, INVALID, nullptr, 0, 0, "Maximum number of errors to emit before stopping (0 = no limit)", nullptr, nullptr) OPTION(prefix_2, "error-unresolved-symbols", error_unresolved_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, "Report unresolved symbols as errors", nullptr, nullptr) -OPTION(prefix_2, "exclude-libs=", alias_exclude_libs, Joined, INVALID, exclude_libs, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "exclude-libs=", exclude_libs_eq, Joined, INVALID, exclude_libs, nullptr, 0, 0, + "Exclude static libraries from automatic export", nullptr, nullptr) OPTION(prefix_2, "exclude-libs", exclude_libs, Separate, INVALID, INVALID, nullptr, 0, 0, "Exclude static libraries from automatic export", nullptr, nullptr) -OPTION(prefix_2, "export-dynamic-symbol=", alias_export_dynamic_symbol, Joined, INVALID, export_dynamic_symbol, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "export-dynamic-symbol=", export_dynamic_symbol_eq, Joined, INVALID, export_dynamic_symbol, nullptr, 0, 0, + "Put a symbol in the dynamic symbol table", nullptr, nullptr) OPTION(prefix_2, "export-dynamic-symbol", export_dynamic_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, "Put a symbol in the dynamic symbol table", nullptr, nullptr) OPTION(prefix_2, "export-dynamic", export_dynamic, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -117,12 +126,19 @@ OPTION(prefix_1, "E", alias_export_dynamic_E, Flag, INVALID, export_dynamic, nul OPTION(prefix_1, "e", alias_entry_e, JoinedOrSeparate, INVALID, entry, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "fatal-warnings", fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0, "Treat warnings as errors", nullptr, nullptr) -OPTION(prefix_2, "filter=", filter, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "filter=", filter_eq, Joined, INVALID, filter, nullptr, 0, 0, "Set DT_FILTER field to the specified name", nullptr, nullptr) -OPTION(prefix_2, "fini=", alias_fini_fini, Joined, INVALID, fini, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "filter", filter, Separate, INVALID, INVALID, nullptr, 0, 0, + "Set DT_FILTER field to the specified name", nullptr, nullptr) +OPTION(prefix_2, "fini=", fini_eq, Joined, INVALID, fini, nullptr, 0, 0, + "Specify a finalizer function", "", nullptr) OPTION(prefix_2, "fini", fini, Separate, INVALID, INVALID, nullptr, 0, 0, "Specify a finalizer function", "", nullptr) -OPTION(prefix_2, "format=", format, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "fix-cortex-a53-843419", fix_cortex_a53_843419, Flag, INVALID, INVALID, nullptr, 0, 0, + "Apply fixes for AArch64 Cortex-A53 erratum 843419", nullptr, nullptr) +OPTION(prefix_2, "format=", format_eq, Joined, INVALID, format, nullptr, 0, 0, + "Change the input format of the inputs following this option", "", nullptr) +OPTION(prefix_2, "format", format, Separate, INVALID, INVALID, nullptr, 0, 0, "Change the input format of the inputs following this option", "", nullptr) OPTION(prefix_2, "full-shutdown", full_shutdown, Flag, INVALID, INVALID, nullptr, 0, 0, "Perform a full shutdown instead of calling _exit", nullptr, nullptr) @@ -134,23 +150,36 @@ OPTION(prefix_2, "gdb-index", gdb_index, Flag, INVALID, INVALID, nullptr, 0, 0, "Generate .gdb_index section", nullptr, nullptr) OPTION(prefix_1, "G", G, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "g", g, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "hash-style=", alias_hash_style_hash_style, Joined, INVALID, hash_style, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "hash-style=", hash_style_eq, Joined, INVALID, hash_style, nullptr, 0, 0, + "Specify hash style (sysv, gnu or both)", nullptr, nullptr) OPTION(prefix_2, "hash-style", hash_style, Separate, INVALID, INVALID, nullptr, 0, 0, "Specify hash style (sysv, gnu or both)", nullptr, nullptr) OPTION(prefix_2, "help", help, Flag, INVALID, INVALID, nullptr, 0, 0, "Print option help", nullptr, nullptr) OPTION(prefix_1, "h", alias_soname_h, JoinedOrSeparate, INVALID, soname, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "icf-data", icf_data, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable ICF to also fold identical read only data", nullptr, nullptr) OPTION(prefix_2, "icf=all", icf_all, Flag, INVALID, INVALID, nullptr, 0, 0, "Enable identical code folding", nullptr, nullptr) OPTION(prefix_2, "icf=none", icf_none, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable identical code folding", nullptr, nullptr) -OPTION(prefix_2, "image-base=", image_base, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "image-base=", image_base_eq, Joined, INVALID, image_base, nullptr, 0, 0, "Set the base address", nullptr, nullptr) -OPTION(prefix_2, "init=", alias_init_init, Joined, INVALID, init, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "image-base", image_base, Separate, INVALID, INVALID, nullptr, 0, 0, + "Set the base address", nullptr, nullptr) +OPTION(prefix_2, "init=", init_eq, Joined, INVALID, init, nullptr, 0, 0, + "Specify an initializer function", "", nullptr) OPTION(prefix_2, "init", init, Separate, INVALID, INVALID, nullptr, 0, 0, "Specify an initializer function", "", nullptr) -OPTION(prefix_2, "library-path=", alias_L__library_path, Joined, INVALID, L, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "library=", alias_l__library, Joined, INVALID, l, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "library-path=", library_path_eq, Joined, INVALID, library_path, nullptr, 0, 0, + "Add a directory to the library search path", "", nullptr) +OPTION(prefix_2, "library-path", library_path, Separate, INVALID, INVALID, nullptr, 0, 0, + "Add a directory to the library search path", "", nullptr) +OPTION(prefix_2, "library=", library_eq, Joined, INVALID, library, nullptr, 0, 0, + "Root name of library to use", "", nullptr) +OPTION(prefix_2, "library", library, Separate, INVALID, INVALID, nullptr, 0, 0, + "Root name of library to use", "", nullptr) +OPTION(prefix_2, "long-plt", long_plt, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "lto-aa-pipeline=", lto_aa_pipeline, Joined, INVALID, INVALID, nullptr, 0, 0, "AA pipeline to run during LTO. Used in conjunction with -lto-newpm-passes", nullptr, nullptr) OPTION(prefix_2, "lto-newpm-passes=", lto_newpm_passes, Joined, INVALID, INVALID, nullptr, 0, 0, @@ -159,13 +188,14 @@ OPTION(prefix_2, "lto-O", lto_O, Joined, INVALID, INVALID, nullptr, 0, 0, "Optimization level for LTO", "", nullptr) OPTION(prefix_2, "lto-partitions=", lto_partitions, Joined, INVALID, INVALID, nullptr, 0, 0, "Number of LTO codegen partitions", nullptr, nullptr) -OPTION(prefix_1, "L", L, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, - "Add a directory to the library search path", "", nullptr) -OPTION(prefix_1, "l", l, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, - "Root name of library to use", "", nullptr) -OPTION(prefix_2, "Map=", alias_Map_eq, Joined, INVALID, Map, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "Map", Map, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_1, "L", alias_library_path, JoinedOrSeparate, INVALID, library_path, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_1, "l", alias_library, JoinedOrSeparate, INVALID, library, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "Map=", Map_eq, Joined, INVALID, Map, nullptr, 0, 0, "Print a link map to the specified file", nullptr, nullptr) +OPTION(prefix_2, "Map", Map, Separate, INVALID, INVALID, nullptr, 0, 0, + "Print a link map to the specified file", nullptr, nullptr) +OPTION(prefix_2, "merge-exidx-entries", merge_exidx_entries, Flag, INVALID, INVALID, nullptr, 0, 0, + "Enable merging .ARM.exidx entries", nullptr, nullptr) OPTION(prefix_2, "mllvm", mllvm, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "M", alias_print_map_M, Flag, INVALID, print_map, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "m", m, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, @@ -176,21 +206,32 @@ OPTION(prefix_2, "no-as-needed", no_as_needed, Flag, INVALID, INVALID, nullptr, "Always DT_NEEDED for shared libraries", nullptr, nullptr) OPTION(prefix_2, "no-color-diagnostics", no_color_diagnostics, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not use colors in diagnostics", nullptr, nullptr) -OPTION(prefix_2, "no-copy-dt-needed-entries", no_copy_dt_needed_entries, Flag, INVALID, no_add_needed, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-copy-dt-needed-entries", no_copy_dt_needed_entries, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-ctors-in-init-array", no_ctors_in_init_array, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "no-define-common", no_define_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not assign space to common symbols", nullptr, nullptr) OPTION(prefix_2, "no-demangle", no_demangle, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not demangle symbol names", nullptr, nullptr) OPTION(prefix_2, "no-dynamic-linker", no_dynamic_linker, Flag, INVALID, INVALID, nullptr, 0, 0, "Inhibit output of .interp section", nullptr, nullptr) +OPTION(prefix_2, "no-eh-frame-hdr", no_eh_frame_hdr, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not create .eh_frame_hdr section", nullptr, nullptr) OPTION(prefix_2, "no-export-dynamic", no_export_dynamic, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "no-fatal-warnings", no_fatal_warnings, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "no-gc-sections", no_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable garbage collection of unused sections", nullptr, nullptr) +OPTION(prefix_2, "no-gdb-index", no_gdb_index, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not generate .gdb_index section", nullptr, nullptr) OPTION(prefix_2, "no-gnu-unique", no_gnu_unique, Flag, INVALID, INVALID, nullptr, 0, 0, "Disable STB_GNU_UNIQUE symbol binding", nullptr, nullptr) OPTION(prefix_2, "no-keep-memory", no_keep_memory, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "no-merge-exidx-entries", no_merge_exidx_entries, Flag, INVALID, INVALID, nullptr, 0, 0, + "Disable merging .ARM.exidx entries", nullptr, nullptr) OPTION(prefix_2, "no-mmap-output-file", no_mmap_output_file, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_3, "no-omagic", no_omagic, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not set the text data sections to be writable", "", nullptr) +OPTION(prefix_2, "no-print-gc-sections", no_print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, + "Do not list removed unused sections", nullptr, nullptr) OPTION(prefix_2, "no-rosegment", no_rosegment, Flag, INVALID, INVALID, nullptr, 0, 0, "Do not put read-only non-executable sections in their own segment", nullptr, nullptr) OPTION(prefix_2, "no-threads", no_threads, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -219,17 +260,25 @@ OPTION(prefix_3, "opt-remarks-filename", opt_remarks_filename, Separate, INVALID "YAML output file for optimization remarks", nullptr, nullptr) OPTION(prefix_3, "opt-remarks-with-hotness", opt_remarks_with_hotness, Flag, INVALID, INVALID, nullptr, 0, 0, "Include hotness informations in the optimization remarks file", nullptr, nullptr) +OPTION(prefix_2, "orphan-handling=", orphan_handling_eq, Joined, INVALID, orphan_handling, nullptr, 0, 0, + "Control how orphan sections are handled when linker script used", nullptr, nullptr) +OPTION(prefix_2, "orphan-handling", orphan_handling, Separate, INVALID, INVALID, nullptr, 0, 0, + "Control how orphan sections are handled when linker script used", nullptr, nullptr) OPTION(prefix_3, "output=", alias_o_output, Joined, INVALID, o, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_3, "output", alias_o_output2, Separate, INVALID, o, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_1, "O", O, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_1, "O", O, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Optimize output file size", nullptr, nullptr) OPTION(prefix_1, "o", o, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Path to file to write output", "", nullptr) +OPTION(prefix_2, "pack-dyn-relocs=", pack_dyn_relocs_eq, Joined, INVALID, INVALID, nullptr, 0, 0, + "Pack dynamic relocations in the given format (none or android)", "", nullptr) OPTION(prefix_2, "pic-executable", alias_pie_pic_executable, Flag, INVALID, pie, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "pie", pie, Flag, INVALID, INVALID, nullptr, 0, 0, "Create a position independent executable", nullptr, nullptr) -OPTION(prefix_2, "plugin-opt=", plugin_opt_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "plugin-opt", plugin_opt, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "plugin-opt=", plugin_opt_eq, Joined, INVALID, plugin_opt, nullptr, 0, 0, + "specifies LTO options for compatibility with GNU linkers", nullptr, nullptr) +OPTION(prefix_2, "plugin-opt", plugin_opt, Separate, INVALID, INVALID, nullptr, 0, 0, + "specifies LTO options for compatibility with GNU linkers", nullptr, nullptr) OPTION(prefix_2, "plugin=", plugin_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "plugin", plugin, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "print-gc-sections", print_gc_sections, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -240,34 +289,42 @@ OPTION(prefix_2, "Qy", Qy, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullp OPTION(prefix_1, "q", alias_emit_relocs, Flag, INVALID, emit_relocs, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "relocatable", relocatable, Flag, INVALID, INVALID, nullptr, 0, 0, "Create relocatable object file", nullptr, nullptr) -OPTION(prefix_2, "reproduce=", alias_reproduce_eq, Joined, INVALID, reproduce, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "reproduce=", reproduce_eq, Joined, INVALID, reproduce, nullptr, 0, 0, + "Dump linker invocation and input files for debugging", nullptr, nullptr) OPTION(prefix_2, "reproduce", reproduce, Separate, INVALID, INVALID, nullptr, 0, 0, "Dump linker invocation and input files for debugging", nullptr, nullptr) -OPTION(prefix_2, "retain-symbols-file=", retain_symbols_file, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "retain-symbols-file=", retain_symbols_file_eq, Joined, INVALID, retain_symbols_file, nullptr, 0, 0, + "Retain only the symbols listed in the file", "", nullptr) +OPTION(prefix_2, "retain-symbols-file", retain_symbols_file, Separate, INVALID, INVALID, nullptr, 0, 0, "Retain only the symbols listed in the file", "", nullptr) -OPTION(prefix_2, "retain-symbols-file", alias_retain_symbols_file, Separate, INVALID, retain_symbols_file, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "rpath-link=", rpath_link_eq, Joined, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "rpath-link", rpath_link, Separate, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "rpath=", alias_rpath_rpath, Joined, INVALID, rpath, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "rpath=", rpath_eq, Joined, INVALID, rpath, nullptr, 0, 0, + "Add a DT_RUNPATH to the output", nullptr, nullptr) OPTION(prefix_2, "rpath", rpath, Separate, INVALID, INVALID, nullptr, 0, 0, "Add a DT_RUNPATH to the output", nullptr, nullptr) -OPTION(prefix_2, "rsp-quoting=", rsp_quoting, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "rsp-quoting=", rsp_quoting_eq, Joined, INVALID, rsp_quoting, nullptr, 0, 0, + "Quoting style for response files. Values supported: windows|posix", nullptr, nullptr) +OPTION(prefix_2, "rsp-quoting", rsp_quoting, Separate, INVALID, INVALID, nullptr, 0, 0, "Quoting style for response files. Values supported: windows|posix", nullptr, nullptr) OPTION(prefix_1, "R", alias_rpath_R, JoinedOrSeparate, INVALID, rpath, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "r", alias_relocatable_r, Flag, INVALID, relocatable, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "save-temps", save_temps, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "script=", alias_script, Joined, INVALID, script, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "script=", script_eq, Joined, INVALID, script, nullptr, 0, 0, + "Read linker script", nullptr, nullptr) OPTION(prefix_2, "script", script, Separate, INVALID, INVALID, nullptr, 0, 0, "Read linker script", nullptr, nullptr) OPTION(prefix_2, "section-start", section_start, Separate, INVALID, INVALID, nullptr, 0, 0, "Set address of section", "
", nullptr) OPTION(prefix_2, "shared", shared, Flag, INVALID, INVALID, nullptr, 0, 0, "Build a shared object", nullptr, nullptr) -OPTION(prefix_2, "soname=", soname, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "soname=", soname_eq, Joined, INVALID, soname, nullptr, 0, 0, + "Set DT_SONAME", nullptr, nullptr) +OPTION(prefix_2, "soname", soname, Separate, INVALID, INVALID, nullptr, 0, 0, "Set DT_SONAME", nullptr, nullptr) -OPTION(prefix_2, "soname", alias_soname_soname, Separate, INVALID, soname, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "sort-common", sort_common, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "sort-section=", alias_sort_section, Joined, INVALID, sort_section, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "sort-section=", sort_section_eq, Joined, INVALID, sort_section, nullptr, 0, 0, + "Specifies sections sorting rule when linkerscript is used", nullptr, nullptr) OPTION(prefix_2, "sort-section", sort_section, Separate, INVALID, INVALID, nullptr, 0, 0, "Specifies sections sorting rule when linkerscript is used", nullptr, nullptr) OPTION(prefix_2, "start-group", start_group, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -281,7 +338,9 @@ OPTION(prefix_2, "strip-debug", strip_debug, Flag, INVALID, INVALID, nullptr, 0, "Strip debugging information", nullptr, nullptr) OPTION(prefix_2, "symbol-ordering-file", symbol_ordering_file, Separate, INVALID, INVALID, nullptr, 0, 0, "Layout sections in the order specified by symbol file", nullptr, nullptr) -OPTION(prefix_2, "sysroot=", sysroot, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "sysroot=", sysroot_eq, Joined, INVALID, sysroot, nullptr, 0, 0, + "Set the system root", nullptr, nullptr) +OPTION(prefix_2, "sysroot", sysroot, Separate, INVALID, INVALID, nullptr, 0, 0, "Set the system root", nullptr, nullptr) OPTION(prefix_1, "S", alias_strip_debug_S, Flag, INVALID, strip_debug, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "s", alias_strip_all, Flag, INVALID, strip_all, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -289,12 +348,16 @@ OPTION(prefix_2, "target1-abs", target1_abs, Flag, INVALID, INVALID, nullptr, 0, "Interpret R_ARM_TARGET1 as R_ARM_ABS32", nullptr, nullptr) OPTION(prefix_2, "target1-rel", target1_rel, Flag, INVALID, INVALID, nullptr, 0, 0, "Interpret R_ARM_TARGET1 as R_ARM_REL32", nullptr, nullptr) -OPTION(prefix_2, "target2=", target2, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "target2=", target2_eq, Joined, INVALID, target2, nullptr, 0, 0, "Interpret R_ARM_TARGET2 as , where is one of rel, abs, or got-rel", "", nullptr) -OPTION(prefix_2, "Tbss=", alias_Tbss, Joined, INVALID, Tbss, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "target2", target2, Separate, INVALID, INVALID, nullptr, 0, 0, + "Interpret R_ARM_TARGET2 as , where is one of rel, abs, or got-rel", "", nullptr) +OPTION(prefix_2, "Tbss=", Tbss_eq, Joined, INVALID, Tbss, nullptr, 0, 0, + "Same as --section-start with .bss as the sectionname", nullptr, nullptr) OPTION(prefix_2, "Tbss", Tbss, Separate, INVALID, INVALID, nullptr, 0, 0, "Same as --section-start with .bss as the sectionname", nullptr, nullptr) -OPTION(prefix_2, "Tdata=", alias_Tdata, Joined, INVALID, Tdata, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "Tdata=", Tdata_eq, Joined, INVALID, Tdata, nullptr, 0, 0, + "Same as --section-start with .data as the sectionname", nullptr, nullptr) OPTION(prefix_2, "Tdata", Tdata, Separate, INVALID, INVALID, nullptr, 0, 0, "Same as --section-start with .data as the sectionname", nullptr, nullptr) OPTION(prefix_2, "thinlto-cache-dir=", thinlto_cache_dir, Joined, INVALID, INVALID, nullptr, 0, 0, @@ -305,27 +368,33 @@ OPTION(prefix_2, "thinlto-jobs=", thinlto_jobs, Joined, INVALID, INVALID, nullpt "Number of ThinLTO jobs", nullptr, nullptr) OPTION(prefix_2, "threads", threads, Flag, INVALID, INVALID, nullptr, 0, 0, "Run the linker multi-threaded", nullptr, nullptr) -OPTION(prefix_2, "trace-symbol=", trace_trace_symbol_eq, Joined, INVALID, trace_symbol, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "trace-symbol=", trace_symbol_eq, Joined, INVALID, trace_symbol, nullptr, 0, 0, + "Trace references to symbols", nullptr, nullptr) OPTION(prefix_2, "trace-symbol", trace_symbol, Separate, INVALID, INVALID, nullptr, 0, 0, "Trace references to symbols", nullptr, nullptr) OPTION(prefix_2, "trace", trace, Flag, INVALID, INVALID, nullptr, 0, 0, "Print the names of the input files", nullptr, nullptr) OPTION(prefix_2, "Ttext-segment=", alias_Ttext_segment_eq, Joined, INVALID, Ttext, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "Ttext-segment", alias_Ttext_segment, Separate, INVALID, Ttext, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "Ttext=", alias_Ttext, Joined, INVALID, Ttext, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "Ttext=", Ttext_eq, Joined, INVALID, Ttext, nullptr, 0, 0, + "Same as --section-start with .text as the sectionname", nullptr, nullptr) OPTION(prefix_2, "Ttext", Ttext, Separate, INVALID, INVALID, nullptr, 0, 0, "Same as --section-start with .text as the sectionname", nullptr, nullptr) OPTION(prefix_1, "T", alias_script_T, JoinedOrSeparate, INVALID, script, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_1, "t", alias_trace, Flag, INVALID, trace, nullptr, 0, 0, nullptr, nullptr, nullptr) -OPTION(prefix_2, "undefined=", alias_undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "undefined=", undefined_eq, Joined, INVALID, undefined, nullptr, 0, 0, + "Force undefined symbol during linking", nullptr, nullptr) OPTION(prefix_2, "undefined", undefined, Separate, INVALID, INVALID, nullptr, 0, 0, "Force undefined symbol during linking", nullptr, nullptr) -OPTION(prefix_2, "unresolved-symbols=", unresolved_symbols, Joined, INVALID, INVALID, nullptr, 0, 0, +OPTION(prefix_2, "unresolved-symbols=", unresolved_symbols_eq, Joined, INVALID, unresolved_symbols, nullptr, 0, 0, + "Determine how to handle unresolved symbols", nullptr, nullptr) +OPTION(prefix_2, "unresolved-symbols", unresolved_symbols, Separate, INVALID, INVALID, nullptr, 0, 0, "Determine how to handle unresolved symbols", nullptr, nullptr) OPTION(prefix_1, "u", alias_undefined_u, JoinedOrSeparate, INVALID, undefined, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "verbose", verbose, Flag, INVALID, INVALID, nullptr, 0, 0, "Verbose mode", nullptr, nullptr) -OPTION(prefix_2, "version-script=", alias_version_script_eq, Joined, INVALID, version_script, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "version-script=", version_script_eq, Joined, INVALID, version_script, nullptr, 0, 0, + "Read a version script", nullptr, nullptr) OPTION(prefix_2, "version-script", version_script, Separate, INVALID, INVALID, nullptr, 0, 0, "Read a version script", nullptr, nullptr) OPTION(prefix_2, "version", version, Flag, INVALID, INVALID, nullptr, 0, 0, @@ -336,12 +405,14 @@ OPTION(prefix_1, "v", v, Flag, INVALID, INVALID, nullptr, 0, 0, OPTION(prefix_2, "warn-common", warn_common, Flag, INVALID, INVALID, nullptr, 0, 0, "Warn about duplicate common symbols", nullptr, nullptr) OPTION(prefix_2, "warn-execstack", warn_execstack, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "warn-once", warn_once, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "warn-shared-textrel", warn_shared_textrel, Flag, INVALID, INVALID, nullptr, 0, 0, nullptr, nullptr, nullptr) OPTION(prefix_2, "warn-unresolved-symbols", warn_unresolved_symbols, Flag, INVALID, INVALID, nullptr, 0, 0, "Report unresolved symbols as warnings", nullptr, nullptr) OPTION(prefix_2, "whole-archive", whole_archive, Flag, INVALID, INVALID, nullptr, 0, 0, "Force load of all members in a static library", nullptr, nullptr) -OPTION(prefix_2, "wrap=", alias_wrap_wrap, Joined, INVALID, wrap, nullptr, 0, 0, nullptr, nullptr, nullptr) +OPTION(prefix_2, "wrap=", wrap_eq, Joined, INVALID, wrap, nullptr, 0, 0, + "Use wrapper functions for symbol", "", nullptr) OPTION(prefix_2, "wrap", wrap, Separate, INVALID, INVALID, nullptr, 0, 0, "Use wrapper functions for symbol", "", nullptr) OPTION(prefix_1, "X", alias_discard_locals_X, Flag, INVALID, discard_locals, nullptr, 0, 0, nullptr, nullptr, nullptr) @@ -350,3 +421,10 @@ OPTION(prefix_1, "y", alias_trace_symbol_y, JoinedOrSeparate, INVALID, trace_sym OPTION(prefix_1, "z", z, JoinedOrSeparate, INVALID, INVALID, nullptr, 0, 0, "Linker option extensions", "