svn commit: r326947 - in vendor/lld/dist: . COFF Common ELF ELF/Arch MinGW cmake/modules docs docs/_templates include/lld/Common include/lld/Config include/lld/Core include/lld/Driver include/lld/R...

Dimitry Andric dim at FreeBSD.org
Mon Dec 18 20:12:24 UTC 2017


Author: dim
Date: Mon Dec 18 20:12:21 2017
New Revision: 326947
URL: https://svnweb.freebsd.org/changeset/base/326947

Log:
  Vendor import of lld trunk r321017:
  https://llvm.org/svn/llvm-project/lld/trunk@321017

Added:
  vendor/lld/dist/COFF/MinGW.cpp   (contents, props changed)
  vendor/lld/dist/COFF/MinGW.h   (contents, props changed)
  vendor/lld/dist/Common/
  vendor/lld/dist/Common/Args.cpp   (contents, props changed)
  vendor/lld/dist/Common/CMakeLists.txt   (contents, props changed)
  vendor/lld/dist/Common/ErrorHandler.cpp   (contents, props changed)
  vendor/lld/dist/Common/Memory.cpp   (contents, props changed)
  vendor/lld/dist/Common/Reproduce.cpp   (contents, props changed)
  vendor/lld/dist/Common/Strings.cpp   (contents, props changed)
  vendor/lld/dist/Common/TargetOptionsCommandFlags.cpp   (contents, props changed)
  vendor/lld/dist/Common/Threads.cpp   (contents, props changed)
  vendor/lld/dist/Common/Version.cpp   (contents, props changed)
  vendor/lld/dist/ELF/AArch64ErrataFix.cpp   (contents, props changed)
  vendor/lld/dist/ELF/AArch64ErrataFix.h   (contents, props changed)
  vendor/lld/dist/ELF/Bits.h   (contents, props changed)
  vendor/lld/dist/MinGW/
  vendor/lld/dist/MinGW/CMakeLists.txt   (contents, props changed)
  vendor/lld/dist/MinGW/Driver.cpp   (contents, props changed)
  vendor/lld/dist/MinGW/Options.td
  vendor/lld/dist/docs/WebAssembly.rst
  vendor/lld/dist/include/lld/Common/
  vendor/lld/dist/include/lld/Common/Args.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Driver.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/ErrorHandler.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/LLVM.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Memory.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Reproduce.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Strings.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/TargetOptionsCommandFlags.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Threads.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Version.h   (contents, props changed)
  vendor/lld/dist/include/lld/Common/Version.inc.in   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/alpha.ll
  vendor/lld/dist/test/COFF/Inputs/beta.ll
  vendor/lld/dist/test/COFF/Inputs/except_handler3.lib   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/far-arm-thumb-abs20.s   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/gamma.ll
  vendor/lld/dist/test/COFF/Inputs/library2-arm64.lib   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/library2.def
  vendor/lld/dist/test/COFF/Inputs/locally-imported-def.s   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/locally-imported-imp.s   (contents, props changed)
  vendor/lld/dist/test/COFF/Inputs/lto-cache.ll
  vendor/lld/dist/test/COFF/Inputs/pdb-globals.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb-hashes-1.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb-hashes-2-missing.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb-hashes-2.yaml
  vendor/lld/dist/test/COFF/arm-thumb-branch20-error.s   (contents, props changed)
  vendor/lld/dist/test/COFF/arm64-dynamicbase.s   (contents, props changed)
  vendor/lld/dist/test/COFF/arm64-import2.test
  vendor/lld/dist/test/COFF/armnt-dynamicbase.test
  vendor/lld/dist/test/COFF/common-alignment.test
  vendor/lld/dist/test/COFF/ctors_dtors_priority.s   (contents, props changed)
  vendor/lld/dist/test/COFF/debug-dwarf.test
  vendor/lld/dist/test/COFF/delayimports-armnt.yaml
  vendor/lld/dist/test/COFF/dllexport-mingw.s   (contents, props changed)
  vendor/lld/dist/test/COFF/duplicate.test
  vendor/lld/dist/test/COFF/entry-drectve.test
  vendor/lld/dist/test/COFF/export-all.s   (contents, props changed)
  vendor/lld/dist/test/COFF/export-arm64.yaml
  vendor/lld/dist/test/COFF/export-armnt.yaml
  vendor/lld/dist/test/COFF/filename-casing.s   (contents, props changed)
  vendor/lld/dist/test/COFF/icf-executable.s   (contents, props changed)
  vendor/lld/dist/test/COFF/icf-xdata.s   (contents, props changed)
  vendor/lld/dist/test/COFF/linkrepro-manifest.test
  vendor/lld/dist/test/COFF/linkrepro-pdb.test
  vendor/lld/dist/test/COFF/linkrepro-res.test
  vendor/lld/dist/test/COFF/locally-imported-arm64.test
  vendor/lld/dist/test/COFF/locally-imported-warn-multiple.s   (contents, props changed)
  vendor/lld/dist/test/COFF/lto-cache.ll
  vendor/lld/dist/test/COFF/lto-reloc-model.ll
  vendor/lld/dist/test/COFF/manifestinput-error.test
  vendor/lld/dist/test/COFF/manifestinput-nowarning.test
  vendor/lld/dist/test/COFF/pdata-arm64.yaml
  vendor/lld/dist/test/COFF/pdb-global-hashes.test
  vendor/lld/dist/test/COFF/pdb-globals.test
  vendor/lld/dist/test/COFF/pdb-heapsite.yaml
  vendor/lld/dist/test/COFF/pdb-procid-remapping.test
  vendor/lld/dist/test/COFF/pdb-publics-import.test
  vendor/lld/dist/test/COFF/pdb-same-name.test
  vendor/lld/dist/test/COFF/pdb-thunk.yaml
  vendor/lld/dist/test/COFF/reloc-discarded-early.s   (contents, props changed)
  vendor/lld/dist/test/COFF/reloc-discarded-early2.s   (contents, props changed)
  vendor/lld/dist/test/COFF/safeseh-md.s   (contents, props changed)
  vendor/lld/dist/test/COFF/section-size.s   (contents, props changed)
  vendor/lld/dist/test/COFF/seh-comdat.test
  vendor/lld/dist/test/COFF/strtab-size.s   (contents, props changed)
  vendor/lld/dist/test/COFF/subsystem-drectve.test
  vendor/lld/dist/test/COFF/wholearchive.s   (contents, props changed)
  vendor/lld/dist/test/COFF/wx.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/amdgpu-kernel-0.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/amdgpu-kernel-1.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/amdgpu-kernel-2.o   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/copy-rel-abs.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/copy-rel-large.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/corrupt-version-reference.so   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/dynamic-list-weak-archive.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/eh-frame.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/gc-sections-shared.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/gc-sections-shared2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/local-symbol-in-dso.so   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/map-file5.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/mips-micro.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/undefined-error.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/verneed1.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/verneed2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/weak-undef-lazy.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/wrap-no-real.s   (contents, props changed)
  vendor/lld/dist/test/ELF/Inputs/wrap-no-real2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-call26-thunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-address.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-cli.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-large.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-nopatch.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-recognize.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-cortex-a53-843419-thunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-jump26-thunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-ldprel-lo19-invalid.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-lo12-alignment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-load-alignment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-thunk-pi.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-thunk-script.s   (contents, props changed)
  vendor/lld/dist/test/ELF/aarch64-thunk-section-location.s   (contents, props changed)
  vendor/lld/dist/test/ELF/amdgpu-elf-flags-err.s   (contents, props changed)
  vendor/lld/dist/test/ELF/amdgpu-elf-flags.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-bl-v6.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-blx-v4t.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-branch-rangethunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-branch-undef-weak-plt-thunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-exidx-dedup.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-branch-rangethunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-condbranch-thunk.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-mix-range-thunk-os.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-plt-range-thunk-os.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-range-thunk-os.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thumb-thunk-empty-pass.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-edgecase.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-largesection.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-linkerscript-dotexpr.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-linkerscript-large.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-linkerscript-orphan.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-linkerscript-sort.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-linkerscript.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-multipass.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-re-add.s   (contents, props changed)
  vendor/lld/dist/test/ELF/arm-thunk-toolargesection.s   (contents, props changed)
  vendor/lld/dist/test/ELF/assignment-archive.s   (contents, props changed)
  vendor/lld/dist/test/ELF/chroot.s   (contents, props changed)
  vendor/lld/dist/test/ELF/common-gc.s   (contents, props changed)
  vendor/lld/dist/test/ELF/common-gc2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/common-gc3.s   (contents, props changed)
  vendor/lld/dist/test/ELF/compressed-debug-conflict.s   (contents, props changed)
  vendor/lld/dist/test/ELF/conflict-debug-variable.s   (contents, props changed)
  vendor/lld/dist/test/ELF/conflict-debug-variable2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/copy-rel-abs.s   (contents, props changed)
  vendor/lld/dist/test/ELF/copy-rel-large.s   (contents, props changed)
  vendor/lld/dist/test/ELF/corrupted-version-reference.s   (contents, props changed)
  vendor/lld/dist/test/ELF/defsym-dynamic.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynamic-list-empty.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynamic-list-preempt.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynamic-list-weak-archive.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynamic-list-wildcard.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynamic-no-rosegment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynstr-no-rosegment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/dynsym-no-rosegment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/edata-no-bss.s   (contents, props changed)
  vendor/lld/dist/test/ELF/eh-frame-hdr-icf-fde.s   (contents, props changed)
  vendor/lld/dist/test/ELF/eh-frame.s   (contents, props changed)
  vendor/lld/dist/test/ELF/emit-relocs-gc.s   (contents, props changed)
  vendor/lld/dist/test/ELF/emit-relocs-mergeable-i386.s   (contents, props changed)
  vendor/lld/dist/test/ELF/emit-relocs-mergeable.s   (contents, props changed)
  vendor/lld/dist/test/ELF/executable-undefined-ignoreall.s   (contents, props changed)
  vendor/lld/dist/test/ELF/executable-undefined-protected-ignoreall.s   (contents, props changed)
  vendor/lld/dist/test/ELF/file-access.s   (contents, props changed)
  vendor/lld/dist/test/ELF/fill-trap.s   (contents, props changed)
  vendor/lld/dist/test/ELF/format-binary-non-ascii.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gc-collect-undefined.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gc-sections-linker-defined-symbol.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gc-sections-undefined.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gdb-index-base-addr.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gdb-index-noranges.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gdb-index-tls.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gnu-hash-table-copy.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gnu-hash-table-many.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gnu-hash-table-rwsegment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/gnu-ifunc-dynsym.s   (contents, props changed)
  vendor/lld/dist/test/ELF/got32-i386-pie-rw.s   (contents, props changed)
  vendor/lld/dist/test/ELF/help.s   (contents, props changed)
  vendor/lld/dist/test/ELF/i386-debug-noabs.test
  vendor/lld/dist/test/ELF/i386-got-value.s   (contents, props changed)
  vendor/lld/dist/test/ELF/icf-symbol-type.s   (contents, props changed)
  vendor/lld/dist/test/ELF/invalid-local-symbol-in-dso.s   (contents, props changed)
  vendor/lld/dist/test/ELF/invalid-undef-section-symbol.test
  vendor/lld/dist/test/ELF/linkerscript/Inputs/common-filespec1.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/common-filespec2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/copy-rel-symbol-value.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/provide-shared.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/Inputs/symbol-reserved.script
  vendor/lld/dist/test/ELF/linkerscript/absolute2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/align-section-offset.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/align-section.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/arm-exidx-order.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/arm-exidx-sentinel-and-assignment.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/common-exclude.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/common-filespec.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/copy-rel-symbol-value-err.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/copy-rel-symbol-value.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/emit-reloc-section-names.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/header-phdr.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/image-base.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/include-cycle.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/linker-script-in-search-path.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/memory-at.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/memory-err.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/memory2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/memory3.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/orphan-discard.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/orphan-end.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/orphan-phdrs.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/orphan-report.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/provide-shared.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/region-alias.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/segment-headers.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/symbol-only-flags.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/symbol-ordering-file.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/thunk-gen-mips.s   (contents, props changed)
  vendor/lld/dist/test/ELF/linkerscript/version-linker-symbol.s   (contents, props changed)
  vendor/lld/dist/test/ELF/lto-plugin-ignore.s   (contents, props changed)
  vendor/lld/dist/test/ELF/lto/Inputs/data-ordering-lto.ll
  vendor/lld/dist/test/ELF/lto/Inputs/linker-script-symbols-ipo.ll
  vendor/lld/dist/test/ELF/lto/Inputs/symbol-ordering-lto.ll
  vendor/lld/dist/test/ELF/lto/data-ordering-lto.s   (contents, props changed)
  vendor/lld/dist/test/ELF/lto/keep-undefined.ll
  vendor/lld/dist/test/ELF/lto/linker-script-symbols-assign.ll
  vendor/lld/dist/test/ELF/lto/linker-script-symbols-ipo.ll
  vendor/lld/dist/test/ELF/lto/linker-script-symbols.ll
  vendor/lld/dist/test/ELF/lto/relocatable.ll
  vendor/lld/dist/test/ELF/lto/section-name.ll
  vendor/lld/dist/test/ELF/lto/symbol-ordering-lto.s   (contents, props changed)
  vendor/lld/dist/test/ELF/merge-align.s   (contents, props changed)
  vendor/lld/dist/test/ELF/merge-entsize.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-26-n32-n64.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-got-page-script.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-got-script.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-got.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-got64.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-jal.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-plt.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-relocs.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-micro-thunks.s   (contents, props changed)
  vendor/lld/dist/test/ELF/mips-out-of-bounds-call16-reloc.s   (contents, props changed)
  vendor/lld/dist/test/ELF/pack-dyn-relocs.s   (contents, props changed)
  vendor/lld/dist/test/ELF/pr34660.s   (contents, props changed)
  vendor/lld/dist/test/ELF/pr34872.s   (contents, props changed)
  vendor/lld/dist/test/ELF/relocatable-comdat2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/relocation-b-aarch64.test
  vendor/lld/dist/test/ELF/relro-copyrel-bss-script.s   (contents, props changed)
  vendor/lld/dist/test/ELF/relro-non-contiguous-script-data.s   (contents, props changed)
  vendor/lld/dist/test/ELF/relro-non-contiguous.s   (contents, props changed)
  vendor/lld/dist/test/ELF/relro-script.s   (contents, props changed)
  vendor/lld/dist/test/ELF/shared-lazy.s   (contents, props changed)
  vendor/lld/dist/test/ELF/silent-ignore.test
  vendor/lld/dist/test/ELF/symbol-ordering-file2.s   (contents, props changed)
  vendor/lld/dist/test/ELF/typed-undef.s   (contents, props changed)
  vendor/lld/dist/test/ELF/undef-broken-debug.test
  vendor/lld/dist/test/ELF/weak-entry.s   (contents, props changed)
  vendor/lld/dist/test/ELF/weak-undef-export.s   (contents, props changed)
  vendor/lld/dist/test/ELF/weak-undef-lazy.s   (contents, props changed)
  vendor/lld/dist/test/ELF/weak-undef-val.s   (contents, props changed)
  vendor/lld/dist/test/ELF/wrap-no-real.s   (contents, props changed)
  vendor/lld/dist/test/MinGW/
  vendor/lld/dist/test/MinGW/driver.test
  vendor/lld/dist/test/MinGW/lib.test
  vendor/lld/dist/test/Unit/lit.cfg.py   (contents, props changed)
  vendor/lld/dist/test/Unit/lit.site.cfg.py.in   (contents, props changed)
  vendor/lld/dist/test/lit.cfg.py   (contents, props changed)
  vendor/lld/dist/test/lit.site.cfg.py.in   (contents, props changed)
  vendor/lld/dist/test/wasm/
  vendor/lld/dist/test/wasm/Inputs/
  vendor/lld/dist/test/wasm/Inputs/archive1.ll
  vendor/lld/dist/test/wasm/Inputs/archive2.ll
  vendor/lld/dist/test/wasm/Inputs/call-indirect.ll
  vendor/lld/dist/test/wasm/Inputs/hello.ll
  vendor/lld/dist/test/wasm/Inputs/hidden.ll
  vendor/lld/dist/test/wasm/Inputs/many-funcs.ll
  vendor/lld/dist/test/wasm/Inputs/ret32.ll
  vendor/lld/dist/test/wasm/Inputs/ret64.ll
  vendor/lld/dist/test/wasm/Inputs/weak-alias.ll
  vendor/lld/dist/test/wasm/Inputs/weak-symbol1.ll
  vendor/lld/dist/test/wasm/Inputs/weak-symbol2.ll
  vendor/lld/dist/test/wasm/archive.ll
  vendor/lld/dist/test/wasm/call-indirect.ll
  vendor/lld/dist/test/wasm/conflict.test
  vendor/lld/dist/test/wasm/data-layout.ll
  vendor/lld/dist/test/wasm/entry.ll
  vendor/lld/dist/test/wasm/function-imports-first.ll
  vendor/lld/dist/test/wasm/function-imports.ll
  vendor/lld/dist/test/wasm/function-index.test
  vendor/lld/dist/test/wasm/import-memory.test
  vendor/lld/dist/test/wasm/invalid-stack-size.test
  vendor/lld/dist/test/wasm/lit.local.cfg
  vendor/lld/dist/test/wasm/load-undefined.ll
  vendor/lld/dist/test/wasm/local-symbols.ll
  vendor/lld/dist/test/wasm/many-functions.ll
  vendor/lld/dist/test/wasm/relocatable.ll
  vendor/lld/dist/test/wasm/signature-mismatch.ll
  vendor/lld/dist/test/wasm/stack-pointer.ll
  vendor/lld/dist/test/wasm/strip-debug.test
  vendor/lld/dist/test/wasm/symbol-type-mismatch.ll
  vendor/lld/dist/test/wasm/undefined-entry.test
  vendor/lld/dist/test/wasm/undefined.ll
  vendor/lld/dist/test/wasm/version.ll
  vendor/lld/dist/test/wasm/visibility-hidden.ll
  vendor/lld/dist/test/wasm/weak-alias-overide.ll
  vendor/lld/dist/test/wasm/weak-alias.ll
  vendor/lld/dist/test/wasm/weak-external.ll
  vendor/lld/dist/test/wasm/weak-symbols.ll
  vendor/lld/dist/utils/benchmark.py   (contents, props changed)
  vendor/lld/dist/utils/link.yaml
  vendor/lld/dist/wasm/
  vendor/lld/dist/wasm/CMakeLists.txt   (contents, props changed)
  vendor/lld/dist/wasm/Config.h   (contents, props changed)
  vendor/lld/dist/wasm/Driver.cpp   (contents, props changed)
  vendor/lld/dist/wasm/InputFiles.cpp   (contents, props changed)
  vendor/lld/dist/wasm/InputFiles.h   (contents, props changed)
  vendor/lld/dist/wasm/InputSegment.cpp   (contents, props changed)
  vendor/lld/dist/wasm/InputSegment.h   (contents, props changed)
  vendor/lld/dist/wasm/Options.td
  vendor/lld/dist/wasm/OutputSections.cpp   (contents, props changed)
  vendor/lld/dist/wasm/OutputSections.h   (contents, props changed)
  vendor/lld/dist/wasm/OutputSegment.h   (contents, props changed)
  vendor/lld/dist/wasm/SymbolTable.cpp   (contents, props changed)
  vendor/lld/dist/wasm/SymbolTable.h   (contents, props changed)
  vendor/lld/dist/wasm/Symbols.cpp   (contents, props changed)
  vendor/lld/dist/wasm/Symbols.h   (contents, props changed)
  vendor/lld/dist/wasm/Writer.cpp   (contents, props changed)
  vendor/lld/dist/wasm/Writer.h   (contents, props changed)
  vendor/lld/dist/wasm/WriterUtils.cpp   (contents, props changed)
  vendor/lld/dist/wasm/WriterUtils.h   (contents, props changed)
Deleted:
  vendor/lld/dist/COFF/Error.cpp
  vendor/lld/dist/COFF/Error.h
  vendor/lld/dist/COFF/Memory.h
  vendor/lld/dist/ELF/Error.cpp
  vendor/lld/dist/ELF/Error.h
  vendor/lld/dist/ELF/Memory.h
  vendor/lld/dist/ELF/Threads.h
  vendor/lld/dist/include/lld/Config/
  vendor/lld/dist/include/lld/Core/LLVM.h
  vendor/lld/dist/include/lld/Core/Reproduce.h
  vendor/lld/dist/include/lld/Core/TargetOptionsCommandFlags.h
  vendor/lld/dist/include/lld/Driver/
  vendor/lld/dist/lib/Config/
  vendor/lld/dist/lib/Core/Reproduce.cpp
  vendor/lld/dist/lib/Core/TargetOptionsCommandFlags.cpp
  vendor/lld/dist/test/COFF/nopdb.test
  vendor/lld/dist/test/ELF/Inputs/verneed.so.sh
  vendor/lld/dist/test/ELF/Inputs/verneed1.so
  vendor/lld/dist/test/ELF/Inputs/verneed2.so
  vendor/lld/dist/test/ELF/aarch64-call26-error.s
  vendor/lld/dist/test/ELF/aarch64-jump26-error.s
  vendor/lld/dist/test/ELF/arm-branch-error.s
  vendor/lld/dist/test/ELF/arm-thumb-branch-error.s
  vendor/lld/dist/test/ELF/invalid/Inputs/section-index2.elf
  vendor/lld/dist/test/Unit/lit.cfg
  vendor/lld/dist/test/Unit/lit.site.cfg.in
  vendor/lld/dist/test/lit.cfg
  vendor/lld/dist/test/lit.site.cfg.in
Modified:
  vendor/lld/dist/.arcconfig
  vendor/lld/dist/CMakeLists.txt
  vendor/lld/dist/CODE_OWNERS.TXT
  vendor/lld/dist/COFF/CMakeLists.txt
  vendor/lld/dist/COFF/Chunks.cpp
  vendor/lld/dist/COFF/Chunks.h
  vendor/lld/dist/COFF/Config.h
  vendor/lld/dist/COFF/DLL.cpp
  vendor/lld/dist/COFF/Driver.cpp
  vendor/lld/dist/COFF/Driver.h
  vendor/lld/dist/COFF/DriverUtils.cpp
  vendor/lld/dist/COFF/ICF.cpp
  vendor/lld/dist/COFF/InputFiles.cpp
  vendor/lld/dist/COFF/InputFiles.h
  vendor/lld/dist/COFF/LTO.cpp
  vendor/lld/dist/COFF/LTO.h
  vendor/lld/dist/COFF/MapFile.cpp
  vendor/lld/dist/COFF/MarkLive.cpp
  vendor/lld/dist/COFF/Options.td
  vendor/lld/dist/COFF/PDB.cpp
  vendor/lld/dist/COFF/PDB.h
  vendor/lld/dist/COFF/Strings.cpp
  vendor/lld/dist/COFF/Strings.h
  vendor/lld/dist/COFF/SymbolTable.cpp
  vendor/lld/dist/COFF/SymbolTable.h
  vendor/lld/dist/COFF/Symbols.cpp
  vendor/lld/dist/COFF/Symbols.h
  vendor/lld/dist/COFF/Writer.cpp
  vendor/lld/dist/COFF/Writer.h
  vendor/lld/dist/ELF/Arch/AArch64.cpp
  vendor/lld/dist/ELF/Arch/AMDGPU.cpp
  vendor/lld/dist/ELF/Arch/ARM.cpp
  vendor/lld/dist/ELF/Arch/AVR.cpp
  vendor/lld/dist/ELF/Arch/Mips.cpp
  vendor/lld/dist/ELF/Arch/MipsArchTree.cpp
  vendor/lld/dist/ELF/Arch/PPC.cpp
  vendor/lld/dist/ELF/Arch/PPC64.cpp
  vendor/lld/dist/ELF/Arch/SPARCV9.cpp
  vendor/lld/dist/ELF/Arch/X86.cpp
  vendor/lld/dist/ELF/Arch/X86_64.cpp
  vendor/lld/dist/ELF/CMakeLists.txt
  vendor/lld/dist/ELF/Config.h
  vendor/lld/dist/ELF/Driver.cpp
  vendor/lld/dist/ELF/Driver.h
  vendor/lld/dist/ELF/DriverUtils.cpp
  vendor/lld/dist/ELF/EhFrame.cpp
  vendor/lld/dist/ELF/EhFrame.h
  vendor/lld/dist/ELF/Filesystem.cpp
  vendor/lld/dist/ELF/Filesystem.h
  vendor/lld/dist/ELF/GdbIndex.cpp
  vendor/lld/dist/ELF/GdbIndex.h
  vendor/lld/dist/ELF/ICF.cpp
  vendor/lld/dist/ELF/InputFiles.cpp
  vendor/lld/dist/ELF/InputFiles.h
  vendor/lld/dist/ELF/InputSection.cpp
  vendor/lld/dist/ELF/InputSection.h
  vendor/lld/dist/ELF/LTO.cpp
  vendor/lld/dist/ELF/LTO.h
  vendor/lld/dist/ELF/LinkerScript.cpp
  vendor/lld/dist/ELF/LinkerScript.h
  vendor/lld/dist/ELF/MapFile.cpp
  vendor/lld/dist/ELF/MapFile.h
  vendor/lld/dist/ELF/MarkLive.cpp
  vendor/lld/dist/ELF/Options.td
  vendor/lld/dist/ELF/OutputSections.cpp
  vendor/lld/dist/ELF/OutputSections.h
  vendor/lld/dist/ELF/Relocations.cpp
  vendor/lld/dist/ELF/Relocations.h
  vendor/lld/dist/ELF/ScriptLexer.cpp
  vendor/lld/dist/ELF/ScriptLexer.h
  vendor/lld/dist/ELF/ScriptParser.cpp
  vendor/lld/dist/ELF/ScriptParser.h
  vendor/lld/dist/ELF/Strings.cpp
  vendor/lld/dist/ELF/Strings.h
  vendor/lld/dist/ELF/SymbolTable.cpp
  vendor/lld/dist/ELF/SymbolTable.h
  vendor/lld/dist/ELF/Symbols.cpp
  vendor/lld/dist/ELF/Symbols.h
  vendor/lld/dist/ELF/SyntheticSections.cpp
  vendor/lld/dist/ELF/SyntheticSections.h
  vendor/lld/dist/ELF/Target.cpp
  vendor/lld/dist/ELF/Target.h
  vendor/lld/dist/ELF/Thunks.cpp
  vendor/lld/dist/ELF/Thunks.h
  vendor/lld/dist/ELF/Writer.cpp
  vendor/lld/dist/ELF/Writer.h
  vendor/lld/dist/README.md
  vendor/lld/dist/cmake/modules/AddLLD.cmake
  vendor/lld/dist/docs/Driver.rst
  vendor/lld/dist/docs/NewLLD.rst
  vendor/lld/dist/docs/ReleaseNotes.rst
  vendor/lld/dist/docs/_templates/indexsidebar.html
  vendor/lld/dist/docs/conf.py
  vendor/lld/dist/docs/index.rst
  vendor/lld/dist/docs/sphinx_intro.rst
  vendor/lld/dist/include/lld/Core/Atom.h
  vendor/lld/dist/include/lld/Core/DefinedAtom.h
  vendor/lld/dist/include/lld/Core/Error.h
  vendor/lld/dist/include/lld/Core/LinkingContext.h
  vendor/lld/dist/include/lld/Core/PassManager.h
  vendor/lld/dist/include/lld/Core/Reader.h
  vendor/lld/dist/include/lld/Core/SymbolTable.h
  vendor/lld/dist/include/lld/Core/Writer.h
  vendor/lld/dist/include/lld/ReaderWriter/YamlContext.h
  vendor/lld/dist/lib/CMakeLists.txt
  vendor/lld/dist/lib/Core/CMakeLists.txt
  vendor/lld/dist/lib/Core/Resolver.cpp
  vendor/lld/dist/lib/Core/SymbolTable.cpp
  vendor/lld/dist/lib/Driver/CMakeLists.txt
  vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp
  vendor/lld/dist/lib/ReaderWriter/CMakeLists.txt
  vendor/lld/dist/lib/ReaderWriter/FileArchive.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler.h
  vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt
  vendor/lld/dist/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/FlatNamespaceFile.h
  vendor/lld/dist/lib/ReaderWriter/MachO/GOTPass.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFile.h
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryUtils.h
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileFromAtoms.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/ObjCPass.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/ShimPass.cpp
  vendor/lld/dist/lib/ReaderWriter/MachO/StubsPass.cpp
  vendor/lld/dist/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
  vendor/lld/dist/test/CMakeLists.txt
  vendor/lld/dist/test/COFF/Inputs/pdb-scopes-a.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb-scopes-b.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb_comdat_bar.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb_comdat_main.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb_lines_1.yaml
  vendor/lld/dist/test/COFF/Inputs/pdb_lines_2.yaml
  vendor/lld/dist/test/COFF/arm64-relocs-imports.test
  vendor/lld/dist/test/COFF/armnt-blx23t.test
  vendor/lld/dist/test/COFF/armnt-branch24t.test
  vendor/lld/dist/test/COFF/armnt-imports.test
  vendor/lld/dist/test/COFF/armnt-mov32t-exec.test
  vendor/lld/dist/test/COFF/armnt-movt32t.test
  vendor/lld/dist/test/COFF/def-export-stdcall.s
  vendor/lld/dist/test/COFF/delayimports32.test
  vendor/lld/dist/test/COFF/driver.test
  vendor/lld/dist/test/COFF/entry-inference.test
  vendor/lld/dist/test/COFF/export32.test
  vendor/lld/dist/test/COFF/force.test
  vendor/lld/dist/test/COFF/guardcf.test
  vendor/lld/dist/test/COFF/hello32.test
  vendor/lld/dist/test/COFF/icf-associative.test
  vendor/lld/dist/test/COFF/icf-simple.test
  vendor/lld/dist/test/COFF/include.test
  vendor/lld/dist/test/COFF/libpath.test
  vendor/lld/dist/test/COFF/loadcfg.test
  vendor/lld/dist/test/COFF/locally-imported.test
  vendor/lld/dist/test/COFF/long-section-name.test
  vendor/lld/dist/test/COFF/lto-opt-level.ll
  vendor/lld/dist/test/COFF/manifest.test
  vendor/lld/dist/test/COFF/manifestinput.test
  vendor/lld/dist/test/COFF/msvclto-archive.ll
  vendor/lld/dist/test/COFF/msvclto-order.ll
  vendor/lld/dist/test/COFF/msvclto.ll
  vendor/lld/dist/test/COFF/nodefaultlib.test
  vendor/lld/dist/test/COFF/options.test
  vendor/lld/dist/test/COFF/pdb-comdat.test
  vendor/lld/dist/test/COFF/pdb-diff.test
  vendor/lld/dist/test/COFF/pdb-global-gc.yaml
  vendor/lld/dist/test/COFF/pdb-import-gc.yaml
  vendor/lld/dist/test/COFF/pdb-invalid-func-type.yaml
  vendor/lld/dist/test/COFF/pdb-lib.s
  vendor/lld/dist/test/COFF/pdb-linker-module.test
  vendor/lld/dist/test/COFF/pdb-none.test
  vendor/lld/dist/test/COFF/pdb-options.test
  vendor/lld/dist/test/COFF/pdb-safeseh.yaml
  vendor/lld/dist/test/COFF/pdb-scopes.test
  vendor/lld/dist/test/COFF/pdb-secrel-absolute.yaml
  vendor/lld/dist/test/COFF/pdb-source-lines.test
  vendor/lld/dist/test/COFF/pdb-symbol-types.yaml
  vendor/lld/dist/test/COFF/pdb-type-server-simple.test
  vendor/lld/dist/test/COFF/pdb.test
  vendor/lld/dist/test/COFF/reloc-arm.test
  vendor/lld/dist/test/COFF/reloc-discarded-dwarf.s
  vendor/lld/dist/test/COFF/reloc-discarded.s
  vendor/lld/dist/test/COFF/responsefile.test
  vendor/lld/dist/test/COFF/rsds.test
  vendor/lld/dist/test/COFF/safeseh.s
  vendor/lld/dist/test/COFF/symtab.test
  vendor/lld/dist/test/COFF/thinlto.ll
  vendor/lld/dist/test/ELF/Inputs/copy-rel-pie.s
  vendor/lld/dist/test/ELF/Inputs/shared3.s
  vendor/lld/dist/test/ELF/Inputs/verdef-defaultver.s
  vendor/lld/dist/test/ELF/Inputs/wrap.s
  vendor/lld/dist/test/ELF/aarch64-abs16.s
  vendor/lld/dist/test/ELF/aarch64-abs32.s
  vendor/lld/dist/test/ELF/aarch64-gnu-ifunc-plt.s
  vendor/lld/dist/test/ELF/aarch64-gnu-ifunc.s
  vendor/lld/dist/test/ELF/aarch64-got-reloc.s
  vendor/lld/dist/test/ELF/aarch64-got-relocations.s
  vendor/lld/dist/test/ELF/aarch64-prel16.s
  vendor/lld/dist/test/ELF/aarch64-prel32.s
  vendor/lld/dist/test/ELF/aarch64-tls-gdie.s
  vendor/lld/dist/test/ELF/aarch64-tls-ie.s
  vendor/lld/dist/test/ELF/aarch64-tls-static.s
  vendor/lld/dist/test/ELF/aarch64-tlsdesc.s
  vendor/lld/dist/test/ELF/aarch64-undefined-weak.s
  vendor/lld/dist/test/ELF/abs-hidden.s
  vendor/lld/dist/test/ELF/allow-multiple-definition.s
  vendor/lld/dist/test/ELF/amdgpu-relocs.s
  vendor/lld/dist/test/ELF/arm-copy.s
  vendor/lld/dist/test/ELF/arm-exidx-gc.s
  vendor/lld/dist/test/ELF/arm-exidx-order.s
  vendor/lld/dist/test/ELF/arm-exidx-sentinel-orphan.s
  vendor/lld/dist/test/ELF/arm-exidx-shared.s
  vendor/lld/dist/test/ELF/arm-gnu-ifunc-plt.s
  vendor/lld/dist/test/ELF/arm-gnu-ifunc.s
  vendor/lld/dist/test/ELF/arm-got-relative.s
  vendor/lld/dist/test/ELF/arm-icf-exidx.s
  vendor/lld/dist/test/ELF/arm-pie-relative.s
  vendor/lld/dist/test/ELF/arm-plt-reloc.s
  vendor/lld/dist/test/ELF/arm-static-defines.s
  vendor/lld/dist/test/ELF/arm-thumb-interwork-shared.s
  vendor/lld/dist/test/ELF/arm-thumb-plt-reloc.s
  vendor/lld/dist/test/ELF/arm-thumb-thunk-symbols.s
  vendor/lld/dist/test/ELF/arm-tls-gd-nonpreemptible.s
  vendor/lld/dist/test/ELF/arm-tls-gd32.s
  vendor/lld/dist/test/ELF/arm-tls-ie32.s
  vendor/lld/dist/test/ELF/arm-tls-ldm32.s
  vendor/lld/dist/test/ELF/arm-tls-norelax-gd-ie.s
  vendor/lld/dist/test/ELF/arm-tls-norelax-gd-le.s
  vendor/lld/dist/test/ELF/arm-tls-norelax-ie-le.s
  vendor/lld/dist/test/ELF/arm-tls-norelax-ld-le.s
  vendor/lld/dist/test/ELF/as-needed.s
  vendor/lld/dist/test/ELF/avoid-empty-program-headers.s
  vendor/lld/dist/test/ELF/basic-aarch64.s
  vendor/lld/dist/test/ELF/basic-mips.s
  vendor/lld/dist/test/ELF/basic-ppc.s
  vendor/lld/dist/test/ELF/basic-sparcv9.s
  vendor/lld/dist/test/ELF/basic.s
  vendor/lld/dist/test/ELF/basic32.s
  vendor/lld/dist/test/ELF/basic64be.s
  vendor/lld/dist/test/ELF/build-id.s
  vendor/lld/dist/test/ELF/comment-gc.s
  vendor/lld/dist/test/ELF/common.s
  vendor/lld/dist/test/ELF/compress-debug-sections.s
  vendor/lld/dist/test/ELF/compressed-debug-input.s
  vendor/lld/dist/test/ELF/copy-errors.s
  vendor/lld/dist/test/ELF/copy-rel-pie.s
  vendor/lld/dist/test/ELF/debug-gc.s
  vendor/lld/dist/test/ELF/defsym.s
  vendor/lld/dist/test/ELF/driver-access.test
  vendor/lld/dist/test/ELF/driver.test
  vendor/lld/dist/test/ELF/duplicated-synthetic-sym.s
  vendor/lld/dist/test/ELF/dynamic-got.s
  vendor/lld/dist/test/ELF/dynamic-list.s
  vendor/lld/dist/test/ELF/dynamic-reloc-in-ro.s
  vendor/lld/dist/test/ELF/dynamic-reloc.s
  vendor/lld/dist/test/ELF/dynsym-pie.s
  vendor/lld/dist/test/ELF/edata-etext.s
  vendor/lld/dist/test/ELF/eh-align-cie.s
  vendor/lld/dist/test/ELF/eh-frame-hdr-augmentation.s
  vendor/lld/dist/test/ELF/eh-frame-hdr-icf.s
  vendor/lld/dist/test/ELF/eh-frame-hdr.s
  vendor/lld/dist/test/ELF/eh-frame-merge.s
  vendor/lld/dist/test/ELF/eh-frame-padding-no-rosegment.s
  vendor/lld/dist/test/ELF/emit-relocs-merge.s
  vendor/lld/dist/test/ELF/emit-relocs-shared.s
  vendor/lld/dist/test/ELF/emit-relocs.s
  vendor/lld/dist/test/ELF/exclude-libs.s
  vendor/lld/dist/test/ELF/filter.s
  vendor/lld/dist/test/ELF/gc-merge-local-sym.s
  vendor/lld/dist/test/ELF/gc-sections-merge-addend.s
  vendor/lld/dist/test/ELF/gc-sections-merge-implicit-addend.s
  vendor/lld/dist/test/ELF/gc-sections-merge.s
  vendor/lld/dist/test/ELF/gc-sections-print.s
  vendor/lld/dist/test/ELF/gc-sections-shared.s
  vendor/lld/dist/test/ELF/gdb-index-dup-types.s
  vendor/lld/dist/test/ELF/gdb-index-empty.s
  vendor/lld/dist/test/ELF/gdb-index-gc-sections.s
  vendor/lld/dist/test/ELF/gdb-index-ranges.s
  vendor/lld/dist/test/ELF/gdb-index.s
  vendor/lld/dist/test/ELF/global-offset-table-position-aarch64.s
  vendor/lld/dist/test/ELF/global-offset-table-position-arm.s
  vendor/lld/dist/test/ELF/global-offset-table-position-i386.s
  vendor/lld/dist/test/ELF/global-offset-table-position.s
  vendor/lld/dist/test/ELF/global_offset_table_shared.s
  vendor/lld/dist/test/ELF/gnu-hash-table.s
  vendor/lld/dist/test/ELF/gnu-ifunc-gotpcrel.s
  vendor/lld/dist/test/ELF/gnu-ifunc-i386.s
  vendor/lld/dist/test/ELF/gnu-ifunc-plt-i386.s
  vendor/lld/dist/test/ELF/gnu-ifunc-plt.s
  vendor/lld/dist/test/ELF/gnu-ifunc-shared.s
  vendor/lld/dist/test/ELF/gnu-ifunc.s
  vendor/lld/dist/test/ELF/got-aarch64.s
  vendor/lld/dist/test/ELF/got.s
  vendor/lld/dist/test/ELF/got32-i386.s
  vendor/lld/dist/test/ELF/got32x-i386.s
  vendor/lld/dist/test/ELF/gotpc-relax-nopic.s
  vendor/lld/dist/test/ELF/gotpc-relax-und-dso.s
  vendor/lld/dist/test/ELF/gotpcrelx.s
  vendor/lld/dist/test/ELF/i386-got-and-copy.s
  vendor/lld/dist/test/ELF/i386-gotoff-shared.s
  vendor/lld/dist/test/ELF/i386-gotpc-dynamic.s
  vendor/lld/dist/test/ELF/i386-gotpc.s
  vendor/lld/dist/test/ELF/i386-pc8-pc16-addend.s
  vendor/lld/dist/test/ELF/i386-reloc-16.s
  vendor/lld/dist/test/ELF/i386-reloc-8.s
  vendor/lld/dist/test/ELF/i386-reloc-range.s
  vendor/lld/dist/test/ELF/i386-reloc8-reloc16-addend.s
  vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
  vendor/lld/dist/test/ELF/icf-absolute.s
  vendor/lld/dist/test/ELF/icf-comdat.s
  vendor/lld/dist/test/ELF/icf-i386.s
  vendor/lld/dist/test/ELF/icf-merge-sec.s
  vendor/lld/dist/test/ELF/icf-merge.s
  vendor/lld/dist/test/ELF/icf-non-mergeable.s
  vendor/lld/dist/test/ELF/icf-none.s
  vendor/lld/dist/test/ELF/icf1.s
  vendor/lld/dist/test/ELF/icf2.s
  vendor/lld/dist/test/ELF/icf3.s
  vendor/lld/dist/test/ELF/icf4.s
  vendor/lld/dist/test/ELF/icf5.s
  vendor/lld/dist/test/ELF/icf6.s
  vendor/lld/dist/test/ELF/icf7.s
  vendor/lld/dist/test/ELF/icf9.s
  vendor/lld/dist/test/ELF/image-base.s
  vendor/lld/dist/test/ELF/init_fini_priority.s
  vendor/lld/dist/test/ELF/invalid-linkerscript.test
  vendor/lld/dist/test/ELF/invalid/invalid-debug-relocations.test
  vendor/lld/dist/test/ELF/invalid/invalid-elf.test
  vendor/lld/dist/test/ELF/invalid/invalid-relocation-x64.test
  vendor/lld/dist/test/ELF/libsearch.s
  vendor/lld/dist/test/ELF/linkerscript/align.s
  vendor/lld/dist/test/ELF/linkerscript/at-addr.s
  vendor/lld/dist/test/ELF/linkerscript/at.s
  vendor/lld/dist/test/ELF/linkerscript/common.s
  vendor/lld/dist/test/ELF/linkerscript/compress-debug-sections.s
  vendor/lld/dist/test/ELF/linkerscript/data-segment-relro.s
  vendor/lld/dist/test/ELF/linkerscript/diagnostic.s
  vendor/lld/dist/test/ELF/linkerscript/discard-section-err.s
  vendor/lld/dist/test/ELF/linkerscript/early-assign-symbol.s
  vendor/lld/dist/test/ELF/linkerscript/eh-frame-reloc-out-of-range.s
  vendor/lld/dist/test/ELF/linkerscript/emit-reloc.s
  vendor/lld/dist/test/ELF/linkerscript/emit-relocs-multiple.s
  vendor/lld/dist/test/ELF/linkerscript/extend-pt-load.s
  vendor/lld/dist/test/ELF/linkerscript/filename-spec.s
  vendor/lld/dist/test/ELF/linkerscript/header-addr.s
  vendor/lld/dist/test/ELF/linkerscript/implicit-program-header.s
  vendor/lld/dist/test/ELF/linkerscript/linkerscript.s
  vendor/lld/dist/test/ELF/linkerscript/memory.s
  vendor/lld/dist/test/ELF/linkerscript/merge-sections.s
  vendor/lld/dist/test/ELF/linkerscript/no-space.s
  vendor/lld/dist/test/ELF/linkerscript/noload.s
  vendor/lld/dist/test/ELF/linkerscript/non-alloc.s
  vendor/lld/dist/test/ELF/linkerscript/operators.s
  vendor/lld/dist/test/ELF/linkerscript/out-of-order.s
  vendor/lld/dist/test/ELF/linkerscript/phdr-check.s
  vendor/lld/dist/test/ELF/linkerscript/phdrs.s
  vendor/lld/dist/test/ELF/linkerscript/repsection-symbol.s
  vendor/lld/dist/test/ELF/linkerscript/sections-sort.s
  vendor/lld/dist/test/ELF/linkerscript/segment-start.s
  vendor/lld/dist/test/ELF/linkerscript/sort-non-script.s
  vendor/lld/dist/test/ELF/linkerscript/subalign.s
  vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s
  vendor/lld/dist/test/ELF/linkerscript/symbol-only.s
  vendor/lld/dist/test/ELF/linkerscript/symbol-reserved.s
  vendor/lld/dist/test/ELF/linkerscript/symbols.s
  vendor/lld/dist/test/ELF/linkerscript/unused-synthetic.s
  vendor/lld/dist/test/ELF/lit.local.cfg
  vendor/lld/dist/test/ELF/local-got-pie.s
  vendor/lld/dist/test/ELF/local-got-shared.s
  vendor/lld/dist/test/ELF/local-got.s
  vendor/lld/dist/test/ELF/lto/cache.ll
  vendor/lld/dist/test/ELF/lto/opt-level.ll
  vendor/lld/dist/test/ELF/lto/opt-remarks.ll
  vendor/lld/dist/test/ELF/lto/save-temps.ll
  vendor/lld/dist/test/ELF/lto/shlib-undefined.ll
  vendor/lld/dist/test/ELF/lto/thinlto.ll
  vendor/lld/dist/test/ELF/lto/verify-invalid.ll
  vendor/lld/dist/test/ELF/lto/wrap-1.ll
  vendor/lld/dist/test/ELF/lto/wrap-2.ll
  vendor/lld/dist/test/ELF/many-alloc-sections.s
  vendor/lld/dist/test/ELF/many-sections.s
  vendor/lld/dist/test/ELF/map-file.s
  vendor/lld/dist/test/ELF/merge-reloc.s
  vendor/lld/dist/test/ELF/merge-string.s
  vendor/lld/dist/test/ELF/merge.s
  vendor/lld/dist/test/ELF/mips-64-gprel-so.s
  vendor/lld/dist/test/ELF/mips-64-rels.s
  vendor/lld/dist/test/ELF/mips-align-err.s
  vendor/lld/dist/test/ELF/mips-elf-flags-err.s
  vendor/lld/dist/test/ELF/mips-elf-flags.s
  vendor/lld/dist/test/ELF/mips-got-relocs.s
  vendor/lld/dist/test/ELF/mips-gp-disp.s
  vendor/lld/dist/test/ELF/mips-gp-ext.s
  vendor/lld/dist/test/ELF/mips-gp-local.s
  vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s
  vendor/lld/dist/test/ELF/mips-gprel32-relocs.s
  vendor/lld/dist/test/ELF/mips-hilo-gp-disp.s
  vendor/lld/dist/test/ELF/mips-hilo-hi-only.s
  vendor/lld/dist/test/ELF/mips-n32-rels.s
  vendor/lld/dist/test/ELF/no-inhibit-exec.s
  vendor/lld/dist/test/ELF/non-abs-reloc.s
  vendor/lld/dist/test/ELF/noplt-pie.s
  vendor/lld/dist/test/ELF/pie-weak.s
  vendor/lld/dist/test/ELF/ppc-relocs.s
  vendor/lld/dist/test/ELF/ppc64-addr16-error.s
  vendor/lld/dist/test/ELF/progname.s
  vendor/lld/dist/test/ELF/relocatable-common.s
  vendor/lld/dist/test/ELF/relocatable-compressed-input.s
  vendor/lld/dist/test/ELF/relocatable.s
  vendor/lld/dist/test/ELF/relocation-copy-alias.s
  vendor/lld/dist/test/ELF/relocation-copy-align-common.s
  vendor/lld/dist/test/ELF/relocation-copy-flags.s
  vendor/lld/dist/test/ELF/relocation-copy-relro.s
  vendor/lld/dist/test/ELF/relocation-i686.s
  vendor/lld/dist/test/ELF/relocation-relative-weak.s
  vendor/lld/dist/test/ELF/relocation.s
  vendor/lld/dist/test/ELF/relro-omagic.s
  vendor/lld/dist/test/ELF/reproduce-thin-archive.s
  vendor/lld/dist/test/ELF/reproduce.s
  vendor/lld/dist/test/ELF/resolution-end.s
  vendor/lld/dist/test/ELF/retain-symbols-file.s
  vendor/lld/dist/test/ELF/section-metadata-err.s
  vendor/lld/dist/test/ELF/segments.s
  vendor/lld/dist/test/ELF/shared.s
  vendor/lld/dist/test/ELF/sort-norosegment.s
  vendor/lld/dist/test/ELF/startstop-gccollect.s
  vendor/lld/dist/test/ELF/startstop.s
  vendor/lld/dist/test/ELF/string-gc.s
  vendor/lld/dist/test/ELF/strip-debug.s
  vendor/lld/dist/test/ELF/synthetic-got.s
  vendor/lld/dist/test/ELF/sysroot.s
  vendor/lld/dist/test/ELF/tls-dynamic-i686.s
  vendor/lld/dist/test/ELF/tls-dynamic.s
  vendor/lld/dist/test/ELF/tls-got.s
  vendor/lld/dist/test/ELF/tls-i686.s
  vendor/lld/dist/test/ELF/tls-initial-exec-local.s
  vendor/lld/dist/test/ELF/tls-opt-gdie.s
  vendor/lld/dist/test/ELF/tls-opt-gdiele-i686.s
  vendor/lld/dist/test/ELF/tls-opt-iele-i686-nopic.s
  vendor/lld/dist/test/ELF/tls-static.s
  vendor/lld/dist/test/ELF/tls-two-relocs.s
  vendor/lld/dist/test/ELF/trace-symbols.s
  vendor/lld/dist/test/ELF/undef-version-script.s
  vendor/lld/dist/test/ELF/unresolved-symbols.s
  vendor/lld/dist/test/ELF/verdef-defaultver.s
  vendor/lld/dist/test/ELF/verdef.s
  vendor/lld/dist/test/ELF/verneed-as-needed-weak.s
  vendor/lld/dist/test/ELF/verneed-local.s
  vendor/lld/dist/test/ELF/verneed.s
  vendor/lld/dist/test/ELF/version-script-err.s
  vendor/lld/dist/test/ELF/version-script-extern.s
  vendor/lld/dist/test/ELF/version-script-twice.s
  vendor/lld/dist/test/ELF/version-script.s
  vendor/lld/dist/test/ELF/weak-undef.s
  vendor/lld/dist/test/ELF/wrap.s
  vendor/lld/dist/test/ELF/x86-64-dyn-rel-error.s
  vendor/lld/dist/test/ELF/x86-64-relax-got-abs.s
  vendor/lld/dist/test/ELF/x86-64-reloc-16.s
  vendor/lld/dist/test/ELF/x86-64-reloc-8.s
  vendor/lld/dist/test/ELF/x86-64-reloc-error.s
  vendor/lld/dist/test/ELF/x86-64-reloc-range.s
  vendor/lld/dist/test/ELF/x86-64-tls-gd-local.s
  vendor/lld/dist/tools/lld/CMakeLists.txt
  vendor/lld/dist/tools/lld/lld.cpp
  vendor/lld/dist/unittests/DriverTests/CMakeLists.txt
  vendor/lld/dist/unittests/DriverTests/DarwinLdDriverTest.cpp
  vendor/lld/dist/unittests/MachOTests/CMakeLists.txt

Modified: vendor/lld/dist/.arcconfig
==============================================================================
--- vendor/lld/dist/.arcconfig	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/.arcconfig	Mon Dec 18 20:12:21 2017	(r326947)
@@ -1,4 +1,4 @@
 {
-  "project_id" : "lld",
+  "repository.callsign" : "LLD",
   "conduit_uri" : "https://reviews.llvm.org/"
 }

Modified: vendor/lld/dist/CMakeLists.txt
==============================================================================
--- vendor/lld/dist/CMakeLists.txt	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/CMakeLists.txt	Mon Dec 18 20:12:21 2017	(r326947)
@@ -160,8 +160,8 @@ endif ()
 
 # Configure the Version.inc file.
 configure_file(
-  ${CMAKE_CURRENT_SOURCE_DIR}/include/lld/Config/Version.inc.in
-  ${CMAKE_CURRENT_BINARY_DIR}/include/lld/Config/Version.inc)
+  ${CMAKE_CURRENT_SOURCE_DIR}/include/lld/Common/Version.inc.in
+  ${CMAKE_CURRENT_BINARY_DIR}/include/lld/Common/Version.inc)
 
 
 if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
@@ -210,6 +210,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
     )
 endif()
 
+add_subdirectory(Common)
 add_subdirectory(lib)
 add_subdirectory(tools/lld)
 
@@ -221,4 +222,5 @@ endif()
 add_subdirectory(docs)
 add_subdirectory(COFF)
 add_subdirectory(ELF)
-
+add_subdirectory(MinGW)
+add_subdirectory(wasm)

Modified: vendor/lld/dist/CODE_OWNERS.TXT
==============================================================================
--- vendor/lld/dist/CODE_OWNERS.TXT	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/CODE_OWNERS.TXT	Mon Dec 18 20:12:21 2017	(r326947)
@@ -17,3 +17,6 @@ N: Lang Hames, Nick Kledzik
 E: lhames at gmail.com, kledzik at apple.com
 D: Mach-O backend
 
+N: Sam Clegg
+E: sbc at chromium.org
+D: WebAssembly backend (wasm/*)

Modified: vendor/lld/dist/COFF/CMakeLists.txt
==============================================================================
--- vendor/lld/dist/COFF/CMakeLists.txt	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/CMakeLists.txt	Mon Dec 18 20:12:21 2017	(r326947)
@@ -11,12 +11,12 @@ add_lld_library(lldCOFF
   DLL.cpp
   Driver.cpp
   DriverUtils.cpp
-  Error.cpp
   ICF.cpp
   InputFiles.cpp
   LTO.cpp
   MapFile.cpp
   MarkLive.cpp
+  MinGW.cpp
   PDB.cpp
   Strings.cpp
   SymbolTable.cpp
@@ -26,22 +26,20 @@ add_lld_library(lldCOFF
   LINK_COMPONENTS
   ${LLVM_TARGETS_TO_BUILD}
   BinaryFormat
-  BitReader
   Core
   DebugInfoCodeView
   DebugInfoMSF
   DebugInfoPDB
-  LTO
   LibDriver
-  Object
+  LTO
   MC
-  MCDisassembler
-  Target
+  Object
   Option
   Support
+  WindowsManifest
 
   LINK_LIBS
-  lldCore
+  lldCommon
   ${LLVM_PTHREAD_LIB}
 
   DEPENDS

Modified: vendor/lld/dist/COFF/Chunks.cpp
==============================================================================
--- vendor/lld/dist/COFF/Chunks.cpp	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/Chunks.cpp	Mon Dec 18 20:12:21 2017	(r326947)
@@ -8,10 +8,10 @@
 //===----------------------------------------------------------------------===//
 
 #include "Chunks.h"
-#include "Error.h"
 #include "InputFiles.h"
 #include "Symbols.h"
 #include "Writer.h"
+#include "lld/Common/ErrorHandler.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/BinaryFormat/COFF.h"
 #include "llvm/Object/COFF.h"
@@ -29,18 +29,15 @@ using llvm::support::ulittle32_t;
 namespace lld {
 namespace coff {
 
-SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
+SectionChunk::SectionChunk(ObjFile *F, const coff_section *H)
     : Chunk(SectionKind), Repl(this), Header(H), File(F),
       Relocs(File->getCOFFObj()->getRelocations(Header)),
       NumRelocs(std::distance(Relocs.begin(), Relocs.end())) {
   // Initialize SectionName.
   File->getCOFFObj()->getSectionName(Header, SectionName);
 
-  Align = Header->getAlignment();
+  Alignment = Header->getAlignment();
 
-  // Chunks may be discarded during comdat merging.
-  Discarded = false;
-
   // If linker GC is disabled, every chunk starts out alive.  If linker GC is
   // enabled, treat non-comdat sections as roots. Generally optimized object
   // files will be built with -ffunction-sections or /Gy, so most things worth
@@ -62,7 +59,10 @@ static void applySecRel(const SectionChunk *Sec, uint8
     fatal("SECREL relocation cannot be applied to absolute symbols");
   }
   uint64_t SecRel = S - OS->getRVA();
-  assert(SecRel < INT32_MAX && "overflow in SECREL relocation");
+  if (SecRel > UINT32_MAX) {
+    error("overflow in SECREL relocation in section: " + Sec->getSectionName());
+    return;
+  }
   add32(Off, SecRel);
 }
 
@@ -119,7 +119,7 @@ static uint16_t readMOV(uint8_t *Off) {
   return Imm;
 }
 
-static void applyMOV32T(uint8_t *Off, uint32_t V) {
+void applyMOV32T(uint8_t *Off, uint32_t V) {
   uint16_t ImmW = readMOV(Off);     // read MOVW operand
   uint16_t ImmT = readMOV(Off + 4); // read MOVT operand
   uint32_t Imm = ImmW | (ImmT << 16);
@@ -129,6 +129,8 @@ static void applyMOV32T(uint8_t *Off, uint32_t V) {
 }
 
 static void applyBranch20T(uint8_t *Off, int32_t V) {
+  if (!isInt<21>(V))
+    fatal("relocation out of range");
   uint32_t S = V < 0 ? 1 : 0;
   uint32_t J1 = (V >> 19) & 1;
   uint32_t J2 = (V >> 18) & 1;
@@ -136,7 +138,7 @@ static void applyBranch20T(uint8_t *Off, int32_t V) {
   or16(Off + 2, (J1 << 13) | (J2 << 11) | ((V >> 1) & 0x7ff));
 }
 
-static void applyBranch24T(uint8_t *Off, int32_t V) {
+void applyBranch24T(uint8_t *Off, int32_t V) {
   if (!isInt<25>(V))
     fatal("relocation out of range");
   uint32_t S = V < 0 ? 1 : 0;
@@ -167,36 +169,61 @@ void SectionChunk::applyRelARM(uint8_t *Off, uint16_t 
   }
 }
 
-static void applyArm64Addr(uint8_t *Off, uint64_t Imm) {
+// Interpret the existing immediate value as a byte offset to the
+// target symbol, then update the instruction with the immediate as
+// the page offset from the current instruction to the target.
+static void applyArm64Addr(uint8_t *Off, uint64_t S, uint64_t P) {
+  uint32_t Orig = read32le(Off);
+  uint64_t Imm = ((Orig >> 29) & 0x3) | ((Orig >> 3) & 0x1FFFFC);
+  S += Imm;
+  Imm = (S >> 12) - (P >> 12);
   uint32_t ImmLo = (Imm & 0x3) << 29;
   uint32_t ImmHi = (Imm & 0x1FFFFC) << 3;
   uint64_t Mask = (0x3 << 29) | (0x1FFFFC << 3);
-  write32le(Off, (read32le(Off) & ~Mask) | ImmLo | ImmHi);
+  write32le(Off, (Orig & ~Mask) | ImmLo | ImmHi);
 }
 
 // Update the immediate field in a AARCH64 ldr, str, and add instruction.
-static void applyArm64Imm(uint8_t *Off, uint64_t Imm) {
+// Optionally limit the range of the written immediate by one or more bits
+// (RangeLimit).
+static void applyArm64Imm(uint8_t *Off, uint64_t Imm, uint32_t RangeLimit) {
   uint32_t Orig = read32le(Off);
   Imm += (Orig >> 10) & 0xFFF;
   Orig &= ~(0xFFF << 10);
-  write32le(Off, Orig | ((Imm & 0xFFF) << 10));
+  write32le(Off, Orig | ((Imm & (0xFFF >> RangeLimit)) << 10));
 }
 
+// Add the 12 bit page offset to the existing immediate.
+// Ldr/str instructions store the opcode immediate scaled
+// by the load/store size (giving a larger range for larger
+// loads/stores). The immediate is always (both before and after
+// fixing up the relocation) stored scaled similarly.
+// Even if larger loads/stores have a larger range, limit the
+// effective offset to 12 bit, since it is intended to be a
+// page offset.
 static void applyArm64Ldr(uint8_t *Off, uint64_t Imm) {
-  int Size = read32le(Off) >> 30;
-  Imm >>= Size;
-  applyArm64Imm(Off, Imm);
+  uint32_t Orig = read32le(Off);
+  uint32_t Size = Orig >> 30;
+  // 0x04000000 indicates SIMD/FP registers
+  // 0x00800000 indicates 128 bit
+  if ((Orig & 0x4800000) == 0x4800000)
+    Size += 4;
+  if ((Imm & ((1 << Size) - 1)) != 0)
+    fatal("misaligned ldr/str offset");
+  applyArm64Imm(Off, Imm >> Size, Size);
 }
 
 void SectionChunk::applyRelARM64(uint8_t *Off, uint16_t Type, OutputSection *OS,
                                  uint64_t S, uint64_t P) const {
   switch (Type) {
-  case IMAGE_REL_ARM64_PAGEBASE_REL21: applyArm64Addr(Off, (S >> 12) - (P >> 12)); break;
-  case IMAGE_REL_ARM64_PAGEOFFSET_12A: applyArm64Imm(Off, S & 0xfff); break;
+  case IMAGE_REL_ARM64_PAGEBASE_REL21: applyArm64Addr(Off, S, P); break;
+  case IMAGE_REL_ARM64_PAGEOFFSET_12A: applyArm64Imm(Off, S & 0xfff, 0); break;
   case IMAGE_REL_ARM64_PAGEOFFSET_12L: applyArm64Ldr(Off, S & 0xfff); break;
   case IMAGE_REL_ARM64_BRANCH26:       or32(Off, ((S - P) & 0x0FFFFFFC) >> 2); break;
   case IMAGE_REL_ARM64_ADDR32:         add32(Off, S + Config->ImageBase); break;
+  case IMAGE_REL_ARM64_ADDR32NB:       add32(Off, S); break;
   case IMAGE_REL_ARM64_ADDR64:         add64(Off, S + Config->ImageBase); break;
+  case IMAGE_REL_ARM64_SECREL:         applySecRel(this, Off, OS, S); break;
   default:
     fatal("unsupported relocation type 0x" + Twine::utohexstr(Type));
   }
@@ -224,8 +251,19 @@ void SectionChunk::writeTo(uint8_t *Buf) const {
     // Get the output section of the symbol for this relocation.  The output
     // section is needed to compute SECREL and SECTION relocations used in debug
     // info.
-    SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex);
-    Defined *Sym = cast<Defined>(Body);
+    auto *Sym =
+        dyn_cast_or_null<Defined>(File->getSymbol(Rel.SymbolTableIndex));
+    if (!Sym) {
+      if (isCodeView() || isDWARF())
+        continue;
+      // Symbols in early discarded sections are represented using null pointers,
+      // so we need to retrieve the name from the object file.
+      COFFSymbolRef Sym =
+          check(File->getCOFFObj()->getSymbol(Rel.SymbolTableIndex));
+      StringRef Name;
+      File->getCOFFObj()->getSymbolName(Sym, Name);
+      fatal("relocation against symbol in discarded section: " + Name);
+    }
     Chunk *C = Sym->getChunk();
     OutputSection *OS = C ? C->getOutputSection() : nullptr;
 
@@ -301,8 +339,8 @@ void SectionChunk::getBaserels(std::vector<Baserel> *R
     uint8_t Ty = getBaserelType(Rel);
     if (Ty == IMAGE_REL_BASED_ABSOLUTE)
       continue;
-    SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex);
-    if (isa<DefinedAbsolute>(Body))
+    Symbol *Target = File->getSymbol(Rel.SymbolTableIndex);
+    if (!Target || isa<DefinedAbsolute>(Target))
       continue;
     Res->emplace_back(RVA + Rel.VirtualAddress, Ty);
   }
@@ -323,12 +361,8 @@ bool SectionChunk::isCOMDAT() const {
 void SectionChunk::printDiscardedMessage() const {
   // Removed by dead-stripping. If it's removed by ICF, ICF already
   // printed out the name, so don't repeat that here.
-  if (Sym && this == Repl) {
-    if (Discarded)
-      message("Discarded comdat symbol " + Sym->getName());
-    else if (!Live)
-      message("Discarded " + Sym->getName());
-  }
+  if (Sym && this == Repl)
+    message("Discarded " + Sym->getName());
 }
 
 StringRef SectionChunk::getDebugName() {
@@ -351,7 +385,7 @@ void SectionChunk::replace(SectionChunk *Other) {
 CommonChunk::CommonChunk(const COFFSymbolRef S) : Sym(S) {
   // Common symbols are aligned on natural boundaries up to 32 bytes.
   // This is what MSVC link.exe does.
-  Align = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue()));
+  Alignment = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue()));
 }
 
 uint32_t CommonChunk::getPermissions() const {
@@ -366,7 +400,7 @@ void StringChunk::writeTo(uint8_t *Buf) const {
 ImportThunkChunkX64::ImportThunkChunkX64(Defined *S) : ImpSymbol(S) {
   // Intel Optimization Manual says that all branch targets
   // should be 16-byte aligned. MSVC linker does this too.
-  Align = 16;
+  Alignment = 16;
 }
 
 void ImportThunkChunkX64::writeTo(uint8_t *Buf) const {
@@ -397,10 +431,9 @@ void ImportThunkChunkARM::writeTo(uint8_t *Buf) const 
 }
 
 void ImportThunkChunkARM64::writeTo(uint8_t *Buf) const {
-  int64_t PageOff = (ImpSymbol->getRVA() >> 12) - (RVA >> 12);
   int64_t Off = ImpSymbol->getRVA() & 0xfff;
   memcpy(Buf + OutputSectionOff, ImportThunkARM64, sizeof(ImportThunkARM64));
-  applyArm64Addr(Buf + OutputSectionOff, PageOff);
+  applyArm64Addr(Buf + OutputSectionOff, ImpSymbol->getRVA(), RVA);
   applyArm64Ldr(Buf + OutputSectionOff + 4, Off);
 }
 
@@ -488,8 +521,10 @@ void BaserelChunk::writeTo(uint8_t *Buf) const {
 uint8_t Baserel::getDefaultType() {
   switch (Config->Machine) {
   case AMD64:
+  case ARM64:
     return IMAGE_REL_BASED_DIR64;
   case I386:
+  case ARMNT:
     return IMAGE_REL_BASED_HIGHLOW;
   default:
     llvm_unreachable("unknown machine type");

Modified: vendor/lld/dist/COFF/Chunks.h
==============================================================================
--- vendor/lld/dist/COFF/Chunks.h	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/Chunks.h	Mon Dec 18 20:12:21 2017	(r326947)
@@ -12,7 +12,7 @@
 
 #include "Config.h"
 #include "InputFiles.h"
-#include "lld/Core/LLVM.h"
+#include "lld/Common/LLVM.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/iterator.h"
 #include "llvm/ADT/iterator_range.h"
@@ -33,9 +33,9 @@ class Baserel;
 class Defined;
 class DefinedImportData;
 class DefinedRegular;
-class ObjectFile;
+class ObjFile;
 class OutputSection;
-class SymbolBody;
+class Symbol;
 
 // Mask for section types (code, data, bss, disacardable, etc.)
 // and permissions (writable, readable or executable).
@@ -62,7 +62,6 @@ class Chunk { (public)
 
   // The writer sets and uses the addresses.
   uint64_t getRVA() const { return RVA; }
-  uint32_t getAlign() const { return Align; }
   void setRVA(uint64_t V) { RVA = V; }
 
   // Returns true if this has non-zero data. BSS chunks return
@@ -82,7 +81,7 @@ class Chunk { (public)
   // An output section has pointers to chunks in the section, and each
   // chunk has a back pointer to an output section.
   void setOutputSection(OutputSection *O) { Out = O; }
-  OutputSection *getOutputSection() { return Out; }
+  OutputSection *getOutputSection() const { return Out; }
 
   // Windows-specific.
   // Collect all locations that contain absolute addresses for base relocations.
@@ -92,23 +91,22 @@ class Chunk { (public)
   // bytes, so this is used only for logging or debugging.
   virtual StringRef getDebugName() { return ""; }
 
+  // The alignment of this chunk. The writer uses the value.
+  uint32_t Alignment = 1;
+
 protected:
   Chunk(Kind K = OtherKind) : ChunkKind(K) {}
   const Kind ChunkKind;
 
-  // The alignment of this chunk. The writer uses the value.
-  uint32_t Align = 1;
-
   // The RVA of this chunk in the output. The writer sets a value.
   uint64_t RVA = 0;
 
+  // The output section for this chunk.
+  OutputSection *Out = nullptr;
+
 public:
   // The offset from beginning of the output section. The writer sets a value.
   uint64_t OutputSectionOff = 0;
-
-protected:
-  // The output section for this chunk.
-  OutputSection *Out = nullptr;
 };
 
 // A chunk corresponding a section of an input file.
@@ -119,23 +117,21 @@ class SectionChunk final : public Chunk {
 public:
   class symbol_iterator : public llvm::iterator_adaptor_base<
                               symbol_iterator, const coff_relocation *,
-                              std::random_access_iterator_tag, SymbolBody *> {
+                              std::random_access_iterator_tag, Symbol *> {
     friend SectionChunk;
 
-    ObjectFile *File;
+    ObjFile *File;
 
-    symbol_iterator(ObjectFile *File, const coff_relocation *I)
+    symbol_iterator(ObjFile *File, const coff_relocation *I)
         : symbol_iterator::iterator_adaptor_base(I), File(File) {}
 
   public:
     symbol_iterator() = default;
 
-    SymbolBody *operator*() const {
-      return File->getSymbolBody(I->SymbolTableIndex);
-    }
+    Symbol *operator*() const { return File->getSymbol(I->SymbolTableIndex); }
   };
 
-  SectionChunk(ObjectFile *File, const coff_section *Header);
+  SectionChunk(ObjFile *File, const coff_section *Header);
   static bool classof(const Chunk *C) { return C->kind() == SectionKind; }
   size_t getSize() const override { return Header->SizeOfRawData; }
   ArrayRef<uint8_t> getContents() const;
@@ -163,10 +159,9 @@ class SectionChunk final : public Chunk {
   void addAssociative(SectionChunk *Child);
 
   StringRef getDebugName() override;
-  void setSymbol(DefinedRegular *S) { if (!Sym) Sym = S; }
 
-  // Returns true if the chunk was not dropped by GC or COMDAT deduplication.
-  bool isLive() { return Live && !Discarded; }
+  // Returns true if the chunk was not dropped by GC.
+  bool isLive() { return Live; }
 
   // Used by the garbage collector.
   void markLive() {
@@ -175,21 +170,16 @@ class SectionChunk final : public Chunk {
     Live = true;
   }
 
-  // Returns true if this chunk was dropped by COMDAT deduplication.
-  bool isDiscarded() const { return Discarded; }
-
-  // Used by the SymbolTable when discarding unused comdat sections. This is
-  // redundant when GC is enabled, as all comdat sections will start out dead.
-  void markDiscarded() { Discarded = true; }
-
   // True if this is a codeview debug info chunk. These will not be laid out in
   // the image. Instead they will end up in the PDB, if one is requested.
   bool isCodeView() const {
     return SectionName == ".debug" || SectionName.startswith(".debug$");
   }
 
-  // True if this is a DWARF debug info chunk.
-  bool isDWARF() const { return SectionName.startswith(".debug_"); }
+  // True if this is a DWARF debug info or exception handling chunk.
+  bool isDWARF() const {
+    return SectionName.startswith(".debug_") || SectionName == ".eh_frame";
+  }
 
   // Allow iteration over the bodies of this chunk's relocated symbols.
   llvm::iterator_range<symbol_iterator> symbols() const {
@@ -213,26 +203,23 @@ class SectionChunk final : public Chunk {
   const coff_section *Header;
 
   // The file that this chunk was created from.
-  ObjectFile *File;
+  ObjFile *File;
 
+  // The COMDAT leader symbol if this is a COMDAT chunk.
+  DefinedRegular *Sym = nullptr;
+
 private:
   StringRef SectionName;
   std::vector<SectionChunk *> AssocChildren;
   llvm::iterator_range<const coff_relocation *> Relocs;
   size_t NumRelocs;
 
-  // True if this chunk was discarded because it was a duplicate comdat section.
-  bool Discarded;
-
   // Used by the garbage collector.
   bool Live;
 
   // Used for ICF (Identical COMDAT Folding)
   void replace(SectionChunk *Other);
   uint32_t Class[2] = {0, 0};
-
-  // Sym points to a section symbol if this is a COMDAT chunk.
-  DefinedRegular *Sym = nullptr;
 };
 
 // A chunk for common symbols. Common chunks don't have actual data.
@@ -368,6 +355,9 @@ class Baserel { (public)
   uint32_t RVA;
   uint8_t Type;
 };
+
+void applyMOV32T(uint8_t *Off, uint32_t V);
+void applyBranch24T(uint8_t *Off, int32_t V);
 
 } // namespace coff
 } // namespace lld

Modified: vendor/lld/dist/COFF/Config.h
==============================================================================
--- vendor/lld/dist/COFF/Config.h	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/Config.h	Mon Dec 18 20:12:21 2017	(r326947)
@@ -12,6 +12,7 @@
 
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Object/COFF.h"
+#include "llvm/Support/CachePruning.h"
 #include <cstdint>
 #include <map>
 #include <set>
@@ -26,8 +27,7 @@ using llvm::StringRef;
 class DefinedAbsolute;
 class DefinedRelative;
 class StringChunk;
-struct Symbol;
-class SymbolBody;
+class Symbol;
 
 // Short aliases.
 static const auto AMD64 = llvm::COFF::IMAGE_FILE_MACHINE_AMD64;
@@ -39,7 +39,7 @@ static const auto I386 = llvm::COFF::IMAGE_FILE_MACHIN
 struct Export {
   StringRef Name;       // N in /export:N or /export:E=N
   StringRef ExtName;    // E in /export:E=N
-  SymbolBody *Sym = nullptr;
+  Symbol *Sym = nullptr;
   uint16_t Ordinal = 0;
   bool Noname = false;
   bool Data = false;
@@ -79,24 +79,23 @@ struct Configuration {
   llvm::COFF::MachineTypes Machine = IMAGE_FILE_MACHINE_UNKNOWN;
   bool Verbose = false;
   WindowsSubsystem Subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
-  SymbolBody *Entry = nullptr;
+  Symbol *Entry = nullptr;
   bool NoEntry = false;
   std::string OutputFile;
   std::string ImportName;
-  bool ColorDiagnostics;
   bool DoGC = true;
   bool DoICF = true;
-  uint64_t ErrorLimit = 20;
   bool Relocatable = true;
   bool Force = false;
   bool Debug = false;
-  bool WriteSymtab = true;
+  bool DebugDwarf = false;
+  bool DebugGHashes = false;
   unsigned DebugTypes = static_cast<unsigned>(DebugType::None);
   llvm::SmallString<128> PDBPath;
   std::vector<llvm::StringRef> Argv;
 
   // Symbols in this set are considered as live by the garbage collector.
-  std::set<SymbolBody *> GCRoot;
+  std::vector<Symbol *> GCRoot;
 
   std::set<StringRef> NoDefaultLibs;
   bool NoDefaultLibAll = false;
@@ -107,7 +106,7 @@ struct Configuration {
   std::vector<Export> Exports;
   std::set<std::string> DelayLoads;
   std::map<std::string, int> DLLOrder;
-  SymbolBody *DelayLoadHelper = nullptr;
+  Symbol *DelayLoadHelper = nullptr;
 
   bool SaveTemps = false;
 
@@ -123,6 +122,11 @@ struct Configuration {
   // Used for /opt:lldltopartitions=N
   unsigned LTOPartitions = 1;
 
+  // Used for /opt:lldltocache=path
+  StringRef LTOCache;
+  // Used for /opt:lldltocachepolicy=policy
+  llvm::CachePruningPolicy LTOCachePolicy;
+
   // Used for /merge:from=to (e.g. /merge:.rdata=.text)
   std::map<StringRef, StringRef> Merge;
 
@@ -139,6 +143,9 @@ struct Configuration {
   StringRef ManifestUIAccess = "'false'";
   StringRef ManifestFile;
 
+  // Used for /aligncomm.
+  std::map<std::string, int> AlignComm;
+
   // Used for /failifmismatch.
   std::map<StringRef, StringRef> MustMatch;
 
@@ -157,13 +164,16 @@ struct Configuration {
   uint32_t MinorImageVersion = 0;
   uint32_t MajorOSVersion = 6;
   uint32_t MinorOSVersion = 0;
+  bool CanExitEarly = false;
   bool DynamicBase = true;
+  bool AllowBind = true;
   bool NxCompat = true;
   bool AllowIsolation = true;
   bool TerminalServerAware = true;
   bool LargeAddressAware = false;
   bool HighEntropyVA = false;
   bool AppContainer = false;
+  bool MinGW = false;
 };
 
 extern Configuration *Config;

Modified: vendor/lld/dist/COFF/DLL.cpp
==============================================================================
--- vendor/lld/dist/COFF/DLL.cpp	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/DLL.cpp	Mon Dec 18 20:12:21 2017	(r326947)
@@ -61,7 +61,7 @@ class HintNameChunk : public Chunk { (private)
 // A chunk for the import descriptor table.
 class LookupChunk : public Chunk {
 public:
-  explicit LookupChunk(Chunk *C) : HintName(C) {}
+  explicit LookupChunk(Chunk *C) : HintName(C) { Alignment = ptrSize(); }
   size_t getSize() const override { return ptrSize(); }
 
   void writeTo(uint8_t *Buf) const override {
@@ -76,7 +76,7 @@ class LookupChunk : public Chunk { (public)
 // See Microsoft PE/COFF spec 7.1. Import Header for details.
 class OrdinalOnlyChunk : public Chunk {
 public:
-  explicit OrdinalOnlyChunk(uint16_t V) : Ordinal(V) {}
+  explicit OrdinalOnlyChunk(uint16_t V) : Ordinal(V) { Alignment = ptrSize(); }
   size_t getSize() const override { return ptrSize(); }
 
   void writeTo(uint8_t *Buf) const override {
@@ -117,7 +117,6 @@ class NullChunk : public Chunk { (public)
   explicit NullChunk(size_t N) : Size(N) {}
   bool hasData() const override { return false; }
   size_t getSize() const override { return Size; }
-  void setAlign(size_t N) { Align = N; }
 
 private:
   size_t Size;
@@ -215,6 +214,22 @@ static const uint8_t ThunkX86[] = {
     0xFF, 0xE0,        // jmp   eax
 };
 
+static const uint8_t ThunkARM[] = {
+    0x40, 0xf2, 0x00, 0x0c, // mov.w   ip, #0 __imp_<FUNCNAME>
+    0xc0, 0xf2, 0x00, 0x0c, // mov.t   ip, #0 __imp_<FUNCNAME>
+    0x2d, 0xe9, 0x0f, 0x48, // push.w  {r0, r1, r2, r3, r11, lr}
+    0x0d, 0xf2, 0x10, 0x0b, // addw    r11, sp, #16
+    0x2d, 0xed, 0x10, 0x0b, // vpush   {d0, d1, d2, d3, d4, d5, d6, d7}
+    0x61, 0x46,             // mov     r1, ip
+    0x40, 0xf2, 0x00, 0x00, // mov.w   r0, #0 DELAY_IMPORT_DESCRIPTOR
+    0xc0, 0xf2, 0x00, 0x00, // mov.t   r0, #0 DELAY_IMPORT_DESCRIPTOR
+    0x00, 0xf0, 0x00, 0xd0, // bl      #0 __delayLoadHelper2
+    0x84, 0x46,             // mov     ip, r0
+    0xbd, 0xec, 0x10, 0x0b, // vpop    {d0, d1, d2, d3, d4, d5, d6, d7}
+    0xbd, 0xe8, 0x0f, 0x48, // pop.w   {r0, r1, r2, r3, r11, lr}
+    0x60, 0x47,             // bx      ip
+};
+
 // A chunk for the delay import thunk.
 class ThunkChunkX64 : public Chunk {
 public:
@@ -259,17 +274,45 @@ class ThunkChunkX86 : public Chunk { (public)
   Defined *Helper = nullptr;
 };
 
+class ThunkChunkARM : public Chunk {
+public:
+  ThunkChunkARM(Defined *I, Chunk *D, Defined *H)
+      : Imp(I), Desc(D), Helper(H) {}
+
+  size_t getSize() const override { return sizeof(ThunkARM); }
+
+  void writeTo(uint8_t *Buf) const override {
+    memcpy(Buf + OutputSectionOff, ThunkARM, sizeof(ThunkARM));
+    applyMOV32T(Buf + OutputSectionOff + 0, Imp->getRVA() + Config->ImageBase);
+    applyMOV32T(Buf + OutputSectionOff + 22, Desc->getRVA() + Config->ImageBase);
+    applyBranch24T(Buf + OutputSectionOff + 30, Helper->getRVA() - RVA - 34);
+  }
+
+  void getBaserels(std::vector<Baserel> *Res) override {
+    Res->emplace_back(RVA + 0, IMAGE_REL_BASED_ARM_MOV32T);
+    Res->emplace_back(RVA + 22, IMAGE_REL_BASED_ARM_MOV32T);
+  }
+
+  Defined *Imp = nullptr;
+  Chunk *Desc = nullptr;
+  Defined *Helper = nullptr;
+};
+
 // A chunk for the import descriptor table.
 class DelayAddressChunk : public Chunk {
 public:
-  explicit DelayAddressChunk(Chunk *C) : Thunk(C) {}
+  explicit DelayAddressChunk(Chunk *C) : Thunk(C) { Alignment = ptrSize(); }
   size_t getSize() const override { return ptrSize(); }
 
   void writeTo(uint8_t *Buf) const override {
     if (Config->is64()) {
       write64le(Buf + OutputSectionOff, Thunk->getRVA() + Config->ImageBase);
     } else {
-      write32le(Buf + OutputSectionOff, Thunk->getRVA() + Config->ImageBase);
+      uint32_t Bit = 0;
+      // Pointer to thumb code must have the LSB set, so adjust it.
+      if (Config->Machine == ARMNT)
+        Bit = 1;
+      write32le(Buf + OutputSectionOff, (Thunk->getRVA() + Config->ImageBase) | Bit);
     }
   }
 
@@ -319,12 +362,16 @@ class AddressTableChunk : public Chunk { (public)
   size_t getSize() const override { return Size * 4; }
 
   void writeTo(uint8_t *Buf) const override {
+    uint32_t Bit = 0;
+    // Pointer to thumb code must have the LSB set, so adjust it.
+    if (Config->Machine == ARMNT)
+      Bit = 1;
     for (Export &E : Config->Exports) {
       uint8_t *P = Buf + OutputSectionOff + E.Ordinal * 4;
       if (E.ForwardChunk) {
-        write32le(P, E.ForwardChunk->getRVA());
+        write32le(P, E.ForwardChunk->getRVA() | Bit);
       } else {
-        write32le(P, cast<Defined>(E.Sym)->getRVA());
+        write32le(P, cast<Defined>(E.Sym)->getRVA() | Bit);
       }
     }
   }
@@ -487,7 +534,7 @@ void DelayLoadContents::create(Defined *H) {
     for (int I = 0, E = Syms.size(); I < E; ++I)
       Syms[I]->setLocation(Addresses[Base + I]);
     auto *MH = make<NullChunk>(8);
-    MH->setAlign(8);
+    MH->Alignment = 8;
     ModuleHandles.push_back(MH);
 
     // Fill the delay import table header fields.
@@ -506,6 +553,8 @@ Chunk *DelayLoadContents::newThunkChunk(DefinedImportD
     return make<ThunkChunkX64>(S, Dir, Helper);
   case I386:
     return make<ThunkChunkX86>(S, Dir, Helper);
+  case ARMNT:
+    return make<ThunkChunkARM>(S, Dir, Helper);
   default:
     llvm_unreachable("unsupported machine type");
   }

Modified: vendor/lld/dist/COFF/Driver.cpp
==============================================================================
--- vendor/lld/dist/COFF/Driver.cpp	Mon Dec 18 20:12:15 2017	(r326946)
+++ vendor/lld/dist/COFF/Driver.cpp	Mon Dec 18 20:12:21 2017	(r326947)
@@ -9,13 +9,15 @@
 
 #include "Driver.h"
 #include "Config.h"
-#include "Error.h"
 #include "InputFiles.h"
-#include "Memory.h"
+#include "MinGW.h"
 #include "SymbolTable.h"
 #include "Symbols.h"
 #include "Writer.h"
-#include "lld/Driver/Driver.h"
+#include "lld/Common/Driver.h"
+#include "lld/Common/ErrorHandler.h"
+#include "lld/Common/Memory.h"
+#include "lld/Common/Version.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/ADT/StringSwitch.h"
 #include "llvm/BinaryFormat/Magic.h"
@@ -48,20 +50,28 @@ namespace coff {
 Configuration *Config;
 LinkerDriver *Driver;
 
-BumpPtrAllocator BAlloc;
-StringSaver Saver{BAlloc};
-std::vector<SpecificAllocBase *> SpecificAllocBase::Instances;
-
-bool link(ArrayRef<const char *> Args, raw_ostream &Diag) {
-  ErrorCount = 0;
-  ErrorOS = &Diag;
+bool link(ArrayRef<const char *> Args, bool CanExitEarly, raw_ostream &Diag) {
+  errorHandler().LogName = Args[0];
+  errorHandler().ErrorOS = &Diag;
+  errorHandler().ColorDiagnostics = Diag.has_colors();
+  errorHandler().ErrorLimitExceededMsg =
+      "too many errors emitted, stopping now"
+      " (use /ERRORLIMIT:0 to see all errors)";
   Config = make<Configuration>();
   Config->Argv = {Args.begin(), Args.end()};
-  Config->ColorDiagnostics =
-      (ErrorOS == &llvm::errs() && Process::StandardErrHasColors());
+  Config->CanExitEarly = CanExitEarly;
+
+  Symtab = make<SymbolTable>();
+
   Driver = make<LinkerDriver>();
   Driver->link(Args);
-  return !ErrorCount;
+
+  // Call exit() if we can to avoid calling destructors.
+  if (CanExitEarly)
+    exitLld(errorCount() ? 1 : 0);
+
+  freeArena();
+  return !errorCount();
 }
 
 // Drop directory components and replace extension with ".exe" or ".dll".
@@ -107,30 +117,46 @@ MemoryBufferRef LinkerDriver::takeBuffer(std::unique_p
   return MBRef;
 }
 
-void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> MB) {
+void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> MB,
+                             bool WholeArchive) {
   MemoryBufferRef MBRef = takeBuffer(std::move(MB));
+  FilePaths.push_back(MBRef.getBufferIdentifier());
 
   // File type is detected by contents, not by file extension.
-  file_magic Magic = identify_magic(MBRef.getBuffer());
-  if (Magic == file_magic::windows_resource) {
+  switch (identify_magic(MBRef.getBuffer())) {
+  case file_magic::windows_resource:
     Resources.push_back(MBRef);
-    return;
-  }
+    break;
 
-  FilePaths.push_back(MBRef.getBufferIdentifier());
-  if (Magic == file_magic::archive)
-    return Symtab.addFile(make<ArchiveFile>(MBRef));
-  if (Magic == file_magic::bitcode)
-    return Symtab.addFile(make<BitcodeFile>(MBRef));
+  case file_magic::archive:
+    if (WholeArchive) {
+      std::unique_ptr<Archive> File =
+          CHECK(Archive::create(MBRef),
+                MBRef.getBufferIdentifier() + ": failed to parse archive");
 
-  if (Magic == file_magic::coff_cl_gl_object)
+      for (MemoryBufferRef M : getArchiveMembers(File.get()))
+        addArchiveBuffer(M, "<whole-archive>", MBRef.getBufferIdentifier());
+      return;
+    }
+    Symtab->addFile(make<ArchiveFile>(MBRef));
+    break;
+
+  case file_magic::bitcode:
+    Symtab->addFile(make<BitcodeFile>(MBRef));
+    break;
+
+  case file_magic::coff_cl_gl_object:
     error(MBRef.getBufferIdentifier() + ": is not a native COFF file. "
           "Recompile without /GL");
-  else
-    Symtab.addFile(make<ObjectFile>(MBRef));
+    break;
+
+  default:
+    Symtab->addFile(make<ObjFile>(MBRef));
+    break;
+  }
 }
 
-void LinkerDriver::enqueuePath(StringRef Path) {
+void LinkerDriver::enqueuePath(StringRef Path, bool WholeArchive) {
   auto Future =
       std::make_shared<std::future<MBErrPair>>(createFutureForFile(Path));
   std::string PathStr = Path;
@@ -139,7 +165,7 @@ void LinkerDriver::enqueuePath(StringRef Path) {
     if (MBOrErr.second)
       error("could not open " + PathStr + ": " + MBOrErr.second.message());
     else
-      Driver->addBuffer(std::move(MBOrErr.first));
+      Driver->addBuffer(std::move(MBOrErr.first), WholeArchive);
   });
 }
 
@@ -147,13 +173,13 @@ void LinkerDriver::addArchiveBuffer(MemoryBufferRef MB
                                     StringRef ParentName) {
   file_magic Magic = identify_magic(MB.getBuffer());
   if (Magic == file_magic::coff_import_library) {
-    Symtab.addFile(make<ImportFile>(MB));
+    Symtab->addFile(make<ImportFile>(MB));
     return;
   }
 
   InputFile *Obj;
   if (Magic == file_magic::coff_object) {
-    Obj = make<ObjectFile>(MB);
+    Obj = make<ObjFile>(MB);
   } else if (Magic == file_magic::bitcode) {
     Obj = make<BitcodeFile>(MB);
   } else {
@@ -162,7 +188,7 @@ void LinkerDriver::addArchiveBuffer(MemoryBufferRef MB
   }
 
   Obj->ParentName = ParentName;
-  Symtab.addFile(Obj);
+  Symtab->addFile(Obj);
   log("Loaded " + toString(Obj) + " for " + SymName);
 }
 
@@ -170,7 +196,7 @@ void LinkerDriver::enqueueArchiveMember(const Archive:
                                         StringRef SymName,
                                         StringRef ParentName) {
   if (!C.getParent()->isThin()) {
-    MemoryBufferRef MB = check(
+    MemoryBufferRef MB = CHECK(
         C.getMemoryBufferRef(),
         "could not get the buffer for the member defining symbol " + SymName);
     enqueueTask([=]() { Driver->addArchiveBuffer(MB, SymName, ParentName); });
@@ -178,39 +204,54 @@ void LinkerDriver::enqueueArchiveMember(const Archive:
   }
 
   auto Future = std::make_shared<std::future<MBErrPair>>(createFutureForFile(
-      check(C.getFullName(),
+      CHECK(C.getFullName(),
             "could not get the filename for the member defining symbol " +
                 SymName)));
   enqueueTask([=]() {
     auto MBOrErr = Future->get();
     if (MBOrErr.second)
-      fatal(MBOrErr.second,
-            "could not get the buffer for the member defining " + SymName);
+      fatal("could not get the buffer for the member defining " + SymName +
+            ": " + MBOrErr.second.message());
     Driver->addArchiveBuffer(takeBuffer(std::move(MBOrErr.first)), SymName,
                              ParentName);
   });
 }
 
 static bool isDecorated(StringRef Sym) {
-  return Sym.startswith("_") || Sym.startswith("@") || Sym.startswith("?");
+  return Sym.startswith("@") || Sym.contains("@@") || Sym.startswith("?") ||
+         (!Config->MinGW && Sym.contains('@'));
 }
 
 // Parses .drectve section contents and returns a list of files
 // specified by /defaultlib.
 void LinkerDriver::parseDirectives(StringRef S) {
+  ArgParser Parser;
+  // .drectve is always tokenized using Windows shell rules.
   opt::InputArgList Args = Parser.parse(S);
 
   for (auto *Arg : Args) {
-    switch (Arg->getOption().getID()) {
+    switch (Arg->getOption().getUnaliasedOption().getID()) {
+    case OPT_aligncomm:
+      parseAligncomm(Arg->getValue());
+      break;
     case OPT_alternatename:
       parseAlternateName(Arg->getValue());
       break;
     case OPT_defaultlib:
       if (Optional<StringRef> Path = findLib(Arg->getValue()))
-        enqueuePath(*Path);
+        enqueuePath(*Path, false);
       break;
+    case OPT_entry:
+      Config->Entry = addUndefined(mangle(Arg->getValue()));
+      break;
     case OPT_export: {
       Export E = parseExport(Arg->getValue());
+      if (Config->Machine == I386 && Config->MinGW) {
+        if (!isDecorated(E.Name))
+          E.Name = Saver.save("_" + E.Name);
+        if (!E.ExtName.empty() && !isDecorated(E.ExtName))
+          E.ExtName = Saver.save("_" + E.ExtName);
+      }
       E.Directives = true;
       Config->Exports.push_back(E);
       break;
@@ -230,9 +271,14 @@ void LinkerDriver::parseDirectives(StringRef S) {
     case OPT_section:
       parseSection(Arg->getValue());
       break;
+    case OPT_subsystem:
+      parseSubsystem(Arg->getValue(), &Config->Subsystem,
+                     &Config->MajorOSVersion, &Config->MinorOSVersion);
+      break;
     case OPT_editandcontinue:
     case OPT_fastfail:
     case OPT_guardsym:
+    case OPT_natvis:
     case OPT_throwingnew:
       break;
     default:
@@ -247,7 +293,7 @@ StringRef LinkerDriver::doFindFile(StringRef Filename)
   bool HasPathSep = (Filename.find_first_of("/\\") != StringRef::npos);
   if (HasPathSep)
     return Filename;
-  bool HasExt = (Filename.find('.') != StringRef::npos);
+  bool HasExt = Filename.contains('.');
   for (StringRef Dir : SearchPaths) {
     SmallString<128> Path = Dir;
     sys::path::append(Path, Filename);
@@ -269,13 +315,15 @@ Optional<StringRef> LinkerDriver::findFile(StringRef F
   bool Seen = !VisitedFiles.insert(Path.lower()).second;
   if (Seen)
     return None;
+  if (Path.endswith_lower(".lib"))
+    VisitedLibs.insert(sys::path::filename(Path));
   return Path;
 }

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list