svn commit: r311125 - in vendor/lld/dist: . COFF ELF cmake/modules docs include/lld/Config include/lld/Core include/lld/Driver include/lld/ReaderWriter include/lld/Support lib/Config lib/Core lib/D...
Dimitry Andric
dim at FreeBSD.org
Mon Jan 2 19:19:17 UTC 2017
Author: dim
Date: Mon Jan 2 19:19:15 2017
New Revision: 311125
URL: https://svnweb.freebsd.org/changeset/base/311125
Log:
Vendor import of lld trunk r290819:
https://llvm.org/svn/llvm-project/lld/trunk@290819
Added:
vendor/lld/dist/COFF/Memory.h (contents, props changed)
vendor/lld/dist/COFF/PDB.h (contents, props changed)
vendor/lld/dist/COFF/Strings.cpp (contents, props changed)
vendor/lld/dist/COFF/Strings.h (contents, props changed)
vendor/lld/dist/ELF/GdbIndex.cpp (contents, props changed)
vendor/lld/dist/ELF/GdbIndex.h (contents, props changed)
vendor/lld/dist/ELF/Memory.h (contents, props changed)
vendor/lld/dist/ELF/Mips.cpp (contents, props changed)
vendor/lld/dist/ELF/SyntheticSections.cpp (contents, props changed)
vendor/lld/dist/ELF/SyntheticSections.h (contents, props changed)
vendor/lld/dist/ELF/Threads.h (contents, props changed)
vendor/lld/dist/cmake/modules/AddLLD.cmake
vendor/lld/dist/include/lld/Core/Reproduce.h (contents, props changed)
vendor/lld/dist/include/lld/Support/
vendor/lld/dist/include/lld/Support/Memory.h (contents, props changed)
vendor/lld/dist/lib/Core/Reproduce.cpp (contents, props changed)
vendor/lld/dist/lib/ReaderWriter/MachO/DebugInfo.h (contents, props changed)
vendor/lld/dist/lib/Support/
vendor/lld/dist/test/COFF/Inputs/cl-gl.obj (contents, props changed)
vendor/lld/dist/test/COFF/Inputs/far-arm-thumb-abs.s (contents, props changed)
vendor/lld/dist/test/COFF/Inputs/lto-lazy-reference-dummy.ll
vendor/lld/dist/test/COFF/Inputs/lto-lazy-reference-quadruple.ll
vendor/lld/dist/test/COFF/arm-thumb-branch-error.s (contents, props changed)
vendor/lld/dist/test/COFF/cl-gl.test
vendor/lld/dist/test/COFF/conflict-mangled.test
vendor/lld/dist/test/COFF/dumppdb.test
vendor/lld/dist/test/COFF/icf-associative.test
vendor/lld/dist/test/COFF/linkrepro.test
vendor/lld/dist/test/COFF/lto-lazy-reference.ll
vendor/lld/dist/test/COFF/pdb.test
vendor/lld/dist/test/COFF/rsds.test
vendor/lld/dist/test/ELF/Inputs/arm-attributes1.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/arm-exidx-cantunwind.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/arm-shared.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/arm-tls-get-addr.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/bad-archive.a (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/comment-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/conflict-debug.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/gdb-index-a.elf (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/gdb-index-b.elf (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/i386-tls-got.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/icf-non-mergeable.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/mips-concatenated-abiflags.o (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/mips-fnpic.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/mips-fpic.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/mips-gp0-non-zero.o (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/mips-n32-rels.o (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/relocatable-tls.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/relocation-relative-absolute.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/shared2-x86-64.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/shf-info-link.test
vendor/lld/dist/test/ELF/Inputs/startstop-shared2.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/uabs_label.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/undef-debug.s (contents, props changed)
vendor/lld/dist/test/ELF/Inputs/use-bar.s (contents, props changed)
vendor/lld/dist/test/ELF/aarch64-gnu-ifunc-plt.s (contents, props changed)
vendor/lld/dist/test/ELF/aarch64-got-reloc.s (contents, props changed)
vendor/lld/dist/test/ELF/aarch64-undefined-weak.s (contents, props changed)
vendor/lld/dist/test/ELF/abs-conflict.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-attributes.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-eabi-version.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-canunwind.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-link.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-order.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-output.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-relocatable.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-sentinel-norelocatable.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-sentinel-orphan.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-exidx-shared.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-gnu-ifunc-plt.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-pie-relative.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-static-defines.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-target1.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-target2.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-thumb-interwork-thunk-range.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-thumb-no-undefined-thunk.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-thumb-undefined-weak.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-gd32.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-ie32.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-ldm32.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-le32.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-norelax-gd-ie.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-norelax-gd-le.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-norelax-ie-le.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-tls-norelax-ld-le.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-undefined-weak.s (contents, props changed)
vendor/lld/dist/test/ELF/arm-use-r-output.s (contents, props changed)
vendor/lld/dist/test/ELF/auxiliary.s (contents, props changed)
vendor/lld/dist/test/ELF/bad-archive.s (contents, props changed)
vendor/lld/dist/test/ELF/color-diagnostics.test
vendor/lld/dist/test/ELF/comment-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/debug-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/defined-tls_get_addr.s (contents, props changed)
vendor/lld/dist/test/ELF/dynamic-got-rela.s (contents, props changed)
vendor/lld/dist/test/ELF/dynamic-got.s (contents, props changed)
vendor/lld/dist/test/ELF/dynamic-list-extern.s (contents, props changed)
vendor/lld/dist/test/ELF/eh-frame-gc2.s (contents, props changed)
vendor/lld/dist/test/ELF/ehdr_start.s (contents, props changed)
vendor/lld/dist/test/ELF/empty-pt-load.s (contents, props changed)
vendor/lld/dist/test/ELF/error-limit.test
vendor/lld/dist/test/ELF/exclude.s (contents, props changed)
vendor/lld/dist/test/ELF/format-binary.test
vendor/lld/dist/test/ELF/gc-debuginfo-tls.s (contents, props changed)
vendor/lld/dist/test/ELF/gc-sections-alloc.s (contents, props changed)
vendor/lld/dist/test/ELF/gc-sections-implicit-addend.s (contents, props changed)
vendor/lld/dist/test/ELF/gc-sections-keep-shared-start.s (contents, props changed)
vendor/lld/dist/test/ELF/gc-sections-non-alloc-to-merge.s (contents, props changed)
vendor/lld/dist/test/ELF/gc-sections-synthetic.s (contents, props changed)
vendor/lld/dist/test/ELF/gdb-index.s (contents, props changed)
vendor/lld/dist/test/ELF/gnu-ifunc-plt-i386.s (contents, props changed)
vendor/lld/dist/test/ELF/gnu-ifunc-plt.s (contents, props changed)
vendor/lld/dist/test/ELF/gnu-ifunc-shared.s (contents, props changed)
vendor/lld/dist/test/ELF/i386-gotoff-shared.s (contents, props changed)
vendor/lld/dist/test/ELF/i386-pc16.test
vendor/lld/dist/test/ELF/i386-tls-got.s (contents, props changed)
vendor/lld/dist/test/ELF/icf-non-mergeable.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/
vendor/lld/dist/test/ELF/invalid/Inputs/
vendor/lld/dist/test/ELF/invalid/Inputs/binding.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/broken-relaxation-x64.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/cie-version2.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/common-symbol-alignment.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/common-symbol-alignment2.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/data-encoding.a (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/dynamic-section-sh_size.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/file-class.a (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/invalid-e_shnum.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/invalid-relocation-x64.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/mips-invalid-options-descriptor.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/multiple-eh-relocs.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/section-alignment-notpow2.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/section-index.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/section-index2.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/shentsize-zero.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/sht-group.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/symbol-index.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/symbol-name-offset.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/symtab-sh_info.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/symtab-sh_info2.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/symtab-sh_info3.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/tls-symbol.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/Inputs/too-short.elf (contents, props changed)
vendor/lld/dist/test/ELF/invalid/broken-relaxation-x64.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/common-symbol-alignment.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/dynamic-section-size.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/eh-frame-hdr-no-out.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/invalid-e_shnum.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/invalid-elf.test
vendor/lld/dist/test/ELF/invalid/invalid-relocation-x64.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/merge-invalid-size.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/mips-invalid-options-descriptor.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/section-alignment.test
vendor/lld/dist/test/ELF/invalid/section-alignment2.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/sht-group.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/symbol-index.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/symbol-name.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/symtab-sh-info.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/symtab-symbols.test
vendor/lld/dist/test/ELF/invalid/tls-symbol.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/too-short.s (contents, props changed)
vendor/lld/dist/test/ELF/invalid/verdef-no-symtab.test
vendor/lld/dist/test/ELF/linkerscript/
vendor/lld/dist/test/ELF/linkerscript/Inputs/
vendor/lld/dist/test/ELF/linkerscript/Inputs/comdat-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/exclude-multiple1.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/exclude-multiple2.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/filename-spec.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/implicit-program-header.script
vendor/lld/dist/test/ELF/linkerscript/Inputs/include.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/keep.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/libsearch-dyn.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/libsearch-st.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/merge-sections-reloc.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/notinclude.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/segment-start.script
vendor/lld/dist/test/ELF/linkerscript/Inputs/shared.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/sort-nested.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/Inputs/sort.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/absolute-expr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/absolute.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/addr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/align-empty.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/align.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/alignof.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/alternate-sections.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/arm-exidx-phdrs.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/assert.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/at.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/comdat-gc.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/common.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/data-commands.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/data-segment-relro.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/define.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/diagnostic.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/discard-interp.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/discard-section.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/dot-is-not-abs.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/double-bss.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/dynamic-sym.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/dynamic.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/edata-etext.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/eh-frame-hdr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/ehdr_start.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/empty-load.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/empty-tls.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/entry.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/exclude-multiple.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/excludefile.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/extend-pt-load.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/filename-spec.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/fill.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/group.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/header-addr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/implicit-program-header.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/input-order.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/input-sec-dup.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/linkerscript.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/loadaddr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/locationcounter.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/locationcountererr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/merge-sections-reloc.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/merge-sections.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/multi-sections-constraint.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/multiple-tbss.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/no-pt-load.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/no-space.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/non-alloc.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/numbers.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/openbsd-bootdata.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/openbsd-randomize.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/openbsd-wxneeded.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/orphan-align.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/orphan-first-cmd.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/orphan.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/orphans.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/ouputformat.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/outputarch.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/outsections-addr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/page-size-align.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/page-size.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/phdr-check.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/phdrs-flags.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/phdrs.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/repsection-symbol.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/repsection-va.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/rosegment.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/searchdir.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-constraint.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-constraint2.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-constraint3.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-constraint4.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-constraint5.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-keep.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-padding.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections-sort.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sections.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/segment-start.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sizeof.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sizeofheaders.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort-constructors.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort-init.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort-nested.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort-non-script.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/sort2.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/start-end.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/subalign.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbol-assignexpr.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbol-conflict.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbol-only.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbolreferenced.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbols-synthetic.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/symbols.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/tbss.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/undef.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/va.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/visibility.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/wildcards.s (contents, props changed)
vendor/lld/dist/test/ELF/linkerscript/wildcards2.s (contents, props changed)
vendor/lld/dist/test/ELF/lto/Inputs/common3.ll
vendor/lld/dist/test/ELF/lto/Inputs/thin1.ll
vendor/lld/dist/test/ELF/lto/Inputs/thin2.ll
vendor/lld/dist/test/ELF/lto/Inputs/thinlto.ll
vendor/lld/dist/test/ELF/lto/Inputs/unnamed-addr-drop.ll
vendor/lld/dist/test/ELF/lto/bitcode-nodatalayout.ll
vendor/lld/dist/test/ELF/lto/common3.ll
vendor/lld/dist/test/ELF/lto/thin-archivecollision.ll
vendor/lld/dist/test/ELF/lto/thinlto.ll
vendor/lld/dist/test/ELF/lto/timepasses.ll
vendor/lld/dist/test/ELF/lto/unnamed-addr-drop.ll
vendor/lld/dist/test/ELF/merge-reloc.s (contents, props changed)
vendor/lld/dist/test/ELF/merge-string-empty.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-26-mask.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-call-hilo.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-elf-flags-err.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-got-hilo.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-got-page.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-gp-ext.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-gp-lowest.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-higher-highest.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-merge-abiflags.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-n32-emul.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-n32-rels.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-no-objects.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-plt-r6.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-relocatable.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-sto-pic-flag.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-tls-static-64.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-tls-static.s (contents, props changed)
vendor/lld/dist/test/ELF/mips-xgot-order.s (contents, props changed)
vendor/lld/dist/test/ELF/no-merge.s (contents, props changed)
vendor/lld/dist/test/ELF/non-abs-reloc.s (contents, props changed)
vendor/lld/dist/test/ELF/oformat-binary-ttext.s (contents, props changed)
vendor/lld/dist/test/ELF/oformat-binary.s (contents, props changed)
vendor/lld/dist/test/ELF/openbsd-randomize.s (contents, props changed)
vendor/lld/dist/test/ELF/openbsd-wxneeded.s (contents, props changed)
vendor/lld/dist/test/ELF/relocatable-comment.s (contents, props changed)
vendor/lld/dist/test/ELF/relocatable-local-sym.s (contents, props changed)
vendor/lld/dist/test/ELF/relocatable-sections.s (contents, props changed)
vendor/lld/dist/test/ELF/relocatable-tls.s (contents, props changed)
vendor/lld/dist/test/ELF/relocatable-visibility.s (contents, props changed)
vendor/lld/dist/test/ELF/relocation-dtrace.test
vendor/lld/dist/test/ELF/relro-omagic.s (contents, props changed)
vendor/lld/dist/test/ELF/reproduce-backslash.s (contents, props changed)
vendor/lld/dist/test/ELF/reproduce-windows2.s (contents, props changed)
vendor/lld/dist/test/ELF/retain-symbols-file.s (contents, props changed)
vendor/lld/dist/test/ELF/section-symbols.test
vendor/lld/dist/test/ELF/sectionstart.s (contents, props changed)
vendor/lld/dist/test/ELF/segments.s (contents, props changed)
vendor/lld/dist/test/ELF/shf-info-link.test
vendor/lld/dist/test/ELF/sort-norosegment.s (contents, props changed)
vendor/lld/dist/test/ELF/startstop-shared2.s (contents, props changed)
vendor/lld/dist/test/ELF/symbol-ordering-file.s (contents, props changed)
vendor/lld/dist/test/ELF/synthetic-got.s (contents, props changed)
vendor/lld/dist/test/ELF/tls-relocatable.s (contents, props changed)
vendor/lld/dist/test/ELF/tls-weak-undef.s (contents, props changed)
vendor/lld/dist/test/ELF/ttext-tdata-tbss.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-complex-wildcards.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-extern-exact.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-extern-wildcards-anon.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-extern-wildcards.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-glob.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-locals-extern.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-locals.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-missing.s (contents, props changed)
vendor/lld/dist/test/ELF/version-script-no-warn.s (contents, props changed)
vendor/lld/dist/test/ELF/version-symbol-error.s (contents, props changed)
vendor/lld/dist/test/ELF/x86-64-relax-got-abs.s (contents, props changed)
vendor/lld/dist/test/ELF/zstack-size.s (contents, props changed)
vendor/lld/dist/test/mach-o/Inputs/arm64/
vendor/lld/dist/test/mach-o/Inputs/arm64/libSystem.yaml
vendor/lld/dist/test/mach-o/Inputs/armv7/
vendor/lld/dist/test/mach-o/Inputs/armv7/libSystem.yaml
vendor/lld/dist/test/mach-o/Inputs/x86/
vendor/lld/dist/test/mach-o/Inputs/x86/libSystem.yaml
vendor/lld/dist/test/mach-o/Inputs/x86_64/
vendor/lld/dist/test/mach-o/Inputs/x86_64/libSystem.yaml
vendor/lld/dist/test/mach-o/bind-opcodes.yaml
vendor/lld/dist/test/mach-o/debug-syms.yaml
vendor/lld/dist/test/mach-o/export-trie-order.yaml
vendor/lld/dist/test/mach-o/lc_segment_filesize.yaml
vendor/lld/dist/test/mach-o/string-table.yaml
vendor/lld/dist/test/mach-o/use-dylib.yaml
Deleted:
vendor/lld/dist/ELF/SymbolListFile.cpp
vendor/lld/dist/ELF/SymbolListFile.h
vendor/lld/dist/test/ELF/Inputs/invalid-binding.elf
vendor/lld/dist/test/ELF/Inputs/invalid-cie-version2.elf
vendor/lld/dist/test/ELF/Inputs/invalid-data-encoding.a
vendor/lld/dist/test/ELF/Inputs/invalid-file-class.a
vendor/lld/dist/test/ELF/Inputs/invalid-multiple-eh-relocs.elf
vendor/lld/dist/test/ELF/Inputs/invalid-section-index.elf
vendor/lld/dist/test/ELF/Inputs/invalid-shentsize-zero.elf
vendor/lld/dist/test/ELF/Inputs/invalid-shstrndx.so
vendor/lld/dist/test/ELF/Inputs/invalid-symtab-sh_info.elf
vendor/lld/dist/test/ELF/amdgpu-entry.s
vendor/lld/dist/test/ELF/arm-attributes-remove.s
vendor/lld/dist/test/ELF/duplicate-internal.s
vendor/lld/dist/test/ELF/eh-frame-hdr-no-out.s
vendor/lld/dist/test/ELF/invalid-elf.test
vendor/lld/dist/test/ELF/linkerscript-align.s
vendor/lld/dist/test/ELF/linkerscript-diagnostic.s
vendor/lld/dist/test/ELF/linkerscript-locationcounter.s
vendor/lld/dist/test/ELF/linkerscript-orphans.s
vendor/lld/dist/test/ELF/linkerscript-ouputformat.s
vendor/lld/dist/test/ELF/linkerscript-outputarch.s
vendor/lld/dist/test/ELF/linkerscript-phdr-check.s
vendor/lld/dist/test/ELF/linkerscript-repsection-va.s
vendor/lld/dist/test/ELF/linkerscript-sections-keep.s
vendor/lld/dist/test/ELF/linkerscript-sections-padding.s
vendor/lld/dist/test/ELF/linkerscript-sections.s
vendor/lld/dist/test/ELF/linkerscript-symbol-conflict.s
vendor/lld/dist/test/ELF/linkerscript-symbols.s
vendor/lld/dist/test/ELF/linkerscript-va.s
vendor/lld/dist/test/ELF/linkerscript.s
vendor/lld/dist/test/ELF/linkerscript2.s
vendor/lld/dist/test/ELF/lto/invalid-bitcode.ll
vendor/lld/dist/test/ELF/merge-invalid-size.s
vendor/lld/dist/test/ELF/mips-gprel32-relocs-gp0.test
vendor/lld/dist/test/ELF/wildcards.s
vendor/lld/dist/test/mach-o/Inputs/libSystem.yaml
Modified:
vendor/lld/dist/CMakeLists.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/Error.cpp
vendor/lld/dist/COFF/Error.h
vendor/lld/dist/COFF/ICF.cpp
vendor/lld/dist/COFF/InputFiles.cpp
vendor/lld/dist/COFF/InputFiles.h
vendor/lld/dist/COFF/Librarian.cpp
vendor/lld/dist/COFF/MarkLive.cpp
vendor/lld/dist/COFF/ModuleDef.cpp
vendor/lld/dist/COFF/Options.td
vendor/lld/dist/COFF/PDB.cpp
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/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/Error.cpp
vendor/lld/dist/ELF/Error.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/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/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/Target.cpp
vendor/lld/dist/ELF/Target.h
vendor/lld/dist/ELF/Thunks.cpp
vendor/lld/dist/ELF/Writer.cpp
vendor/lld/dist/ELF/Writer.h
vendor/lld/dist/docs/Driver.rst
vendor/lld/dist/docs/NewLLD.rst
vendor/lld/dist/docs/ReleaseNotes.rst
vendor/lld/dist/docs/conf.py
vendor/lld/dist/docs/windows_support.rst
vendor/lld/dist/include/lld/Config/Version.h
vendor/lld/dist/include/lld/Config/Version.inc.in
vendor/lld/dist/include/lld/Core/Atom.h
vendor/lld/dist/include/lld/Core/DefinedAtom.h
vendor/lld/dist/include/lld/Core/LinkingContext.h
vendor/lld/dist/include/lld/Core/Node.h
vendor/lld/dist/include/lld/Core/Parallel.h
vendor/lld/dist/include/lld/Core/Pass.h
vendor/lld/dist/include/lld/Core/PassManager.h
vendor/lld/dist/include/lld/Core/Reader.h
vendor/lld/dist/include/lld/Core/Reference.h
vendor/lld/dist/include/lld/Core/Simple.h
vendor/lld/dist/include/lld/Core/SymbolTable.h
vendor/lld/dist/include/lld/Driver/Driver.h
vendor/lld/dist/include/lld/ReaderWriter/MachOLinkingContext.h
vendor/lld/dist/lib/Config/Version.cpp
vendor/lld/dist/lib/Core/CMakeLists.txt
vendor/lld/dist/lib/Core/DefinedAtom.cpp
vendor/lld/dist/lib/Core/Error.cpp
vendor/lld/dist/lib/Core/File.cpp
vendor/lld/dist/lib/Core/LinkingContext.cpp
vendor/lld/dist/lib/Core/Reader.cpp
vendor/lld/dist/lib/Core/Resolver.cpp
vendor/lld/dist/lib/Core/SymbolTable.cpp
vendor/lld/dist/lib/Core/Writer.cpp
vendor/lld/dist/lib/Driver/DarwinLdDriver.cpp
vendor/lld/dist/lib/ReaderWriter/FileArchive.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_arm64.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/ArchHandler_x86_64.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/CMakeLists.txt
vendor/lld/dist/lib/ReaderWriter/MachO/CompactUnwindPass.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/File.h
vendor/lld/dist/lib/ReaderWriter/MachO/GOTPass.cpp
vendor/lld/dist/lib/ReaderWriter/MachO/LayoutPass.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/MachO/TLVPass.cpp
vendor/lld/dist/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
vendor/lld/dist/test/CMakeLists.txt
vendor/lld/dist/test/COFF/common.test
vendor/lld/dist/test/COFF/conflict.test
vendor/lld/dist/test/COFF/delayimports32.test
vendor/lld/dist/test/COFF/dll.test
vendor/lld/dist/test/COFF/export-exe.test
vendor/lld/dist/test/COFF/export.test
vendor/lld/dist/test/COFF/export32.test
vendor/lld/dist/test/COFF/include2.test
vendor/lld/dist/test/COFF/lldmap.test
vendor/lld/dist/test/COFF/noentry.test
vendor/lld/dist/test/COFF/order.test
vendor/lld/dist/test/COFF/reloc-arm.test
vendor/lld/dist/test/COFF/symtab.test
vendor/lld/dist/test/ELF/Inputs/symbol-override.s
vendor/lld/dist/test/ELF/Inputs/verdef-defaultver.s
vendor/lld/dist/test/ELF/aarch64-abs16.s
vendor/lld/dist/test/ELF/aarch64-abs32.s
vendor/lld/dist/test/ELF/aarch64-condb-reloc.s
vendor/lld/dist/test/ELF/aarch64-copy.s
vendor/lld/dist/test/ELF/aarch64-copy2.s
vendor/lld/dist/test/ELF/aarch64-data-relocs.s
vendor/lld/dist/test/ELF/aarch64-fpic-abs16.s
vendor/lld/dist/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
vendor/lld/dist/test/ELF/aarch64-fpic-adr_prel_lo21.s
vendor/lld/dist/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
vendor/lld/dist/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
vendor/lld/dist/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
vendor/lld/dist/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
vendor/lld/dist/test/ELF/aarch64-fpic-prel16.s
vendor/lld/dist/test/ELF/aarch64-fpic-prel32.s
vendor/lld/dist/test/ELF/aarch64-fpic-prel64.s
vendor/lld/dist/test/ELF/aarch64-gnu-ifunc.s
vendor/lld/dist/test/ELF/aarch64-prel16.s
vendor/lld/dist/test/ELF/aarch64-prel32.s
vendor/lld/dist/test/ELF/aarch64-relocs.s
vendor/lld/dist/test/ELF/aarch64-tls-gdie.s
vendor/lld/dist/test/ELF/aarch64-tls-gdle.s
vendor/lld/dist/test/ELF/aarch64-tls-ie.s
vendor/lld/dist/test/ELF/aarch64-tls-iele.s
vendor/lld/dist/test/ELF/aarch64-tls-le.s
vendor/lld/dist/test/ELF/aarch64-tls-static.s
vendor/lld/dist/test/ELF/aarch64-tlsdesc.s
vendor/lld/dist/test/ELF/aarch64-tstbr14-reloc.s
vendor/lld/dist/test/ELF/abs-hidden.s
vendor/lld/dist/test/ELF/allow-multiple-definition.s
vendor/lld/dist/test/ELF/amdgpu-globals.s
vendor/lld/dist/test/ELF/amdgpu-relocs.s
vendor/lld/dist/test/ELF/arm-blx.s
vendor/lld/dist/test/ELF/arm-branch.s
vendor/lld/dist/test/ELF/arm-data-prel.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-thumb-blx.s
vendor/lld/dist/test/ELF/arm-thumb-branch.s
vendor/lld/dist/test/ELF/arm-thumb-interwork-thunk.s
vendor/lld/dist/test/ELF/arm-thumb-narrow-branch-check.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.s
vendor/lld/dist/test/ELF/basic32.s
vendor/lld/dist/test/ELF/basic64be.s
vendor/lld/dist/test/ELF/bss.s
vendor/lld/dist/test/ELF/bsymbolic-undef.s
vendor/lld/dist/test/ELF/bsymbolic.s
vendor/lld/dist/test/ELF/build-id.s
vendor/lld/dist/test/ELF/comdat.s
vendor/lld/dist/test/ELF/common.s
vendor/lld/dist/test/ELF/compressed-debug-input.s
vendor/lld/dist/test/ELF/conflict.s
vendor/lld/dist/test/ELF/copy-errors.s
vendor/lld/dist/test/ELF/copy-in-shared.s
vendor/lld/dist/test/ELF/copy-rel-corrupted.s
vendor/lld/dist/test/ELF/copy-rel-pie-error.s
vendor/lld/dist/test/ELF/discard-locals.s
vendor/lld/dist/test/ELF/discard-none.s
vendor/lld/dist/test/ELF/dont-export-hidden.s
vendor/lld/dist/test/ELF/driver.test
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-index.s
vendor/lld/dist/test/ELF/dynamic-reloc.s
vendor/lld/dist/test/ELF/dynamic.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-dyn-rel.s
vendor/lld/dist/test/ELF/eh-frame-hdr-abs-fde.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-marker.s
vendor/lld/dist/test/ELF/eh-frame-merge.s
vendor/lld/dist/test/ELF/ehframe-relocation.s
vendor/lld/dist/test/ELF/empty-ver.s
vendor/lld/dist/test/ELF/emulation.s
vendor/lld/dist/test/ELF/end-update.s
vendor/lld/dist/test/ELF/end.s
vendor/lld/dist/test/ELF/entry.s
vendor/lld/dist/test/ELF/gc-sections-lsda.s
vendor/lld/dist/test/ELF/gc-sections-shared.s
vendor/lld/dist/test/ELF/gc-sections.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.s
vendor/lld/dist/test/ELF/got-aarch64.s
vendor/lld/dist/test/ELF/got.s
vendor/lld/dist/test/ELF/gotpc-relax-nopic.s
vendor/lld/dist/test/ELF/gotpc-relax.s
vendor/lld/dist/test/ELF/i386-gotpc.s
vendor/lld/dist/test/ELF/i386-tls-ie-shared.s
vendor/lld/dist/test/ELF/icf4.s
vendor/lld/dist/test/ELF/icf5.s
vendor/lld/dist/test/ELF/icf7.s
vendor/lld/dist/test/ELF/image-base.s
vendor/lld/dist/test/ELF/incompatible-ar-first.s
vendor/lld/dist/test/ELF/incompatible.s
vendor/lld/dist/test/ELF/invalid-cie-length.s
vendor/lld/dist/test/ELF/invalid-cie-length2.s
vendor/lld/dist/test/ELF/invalid-cie-length3.s
vendor/lld/dist/test/ELF/invalid-cie-length4.s
vendor/lld/dist/test/ELF/invalid-dynamic-list.test
vendor/lld/dist/test/ELF/invalid-linkerscript.test
vendor/lld/dist/test/ELF/libsearch.s
vendor/lld/dist/test/ELF/local-dynamic.s
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/local.s
vendor/lld/dist/test/ELF/lto/archive-3.ll
vendor/lld/dist/test/ELF/lto/archive.ll
vendor/lld/dist/test/ELF/lto/asmundef.ll
vendor/lld/dist/test/ELF/lto/available-externally.ll
vendor/lld/dist/test/ELF/lto/combined-lto-object-name.ll
vendor/lld/dist/test/ELF/lto/common2.ll
vendor/lld/dist/test/ELF/lto/discard-value-names.ll
vendor/lld/dist/test/ELF/lto/drop-debug-info.ll
vendor/lld/dist/test/ELF/lto/drop-linkage.ll
vendor/lld/dist/test/ELF/lto/duplicated.ll
vendor/lld/dist/test/ELF/lto/dynsym.ll
vendor/lld/dist/test/ELF/lto/internalize-basic.ll
vendor/lld/dist/test/ELF/lto/internalize-exportdyn.ll
vendor/lld/dist/test/ELF/lto/internalize-llvmused.ll
vendor/lld/dist/test/ELF/lto/internalize-undef.ll
vendor/lld/dist/test/ELF/lto/internalize-version-script.ll
vendor/lld/dist/test/ELF/lto/irmover-error.ll
vendor/lld/dist/test/ELF/lto/linkonce-odr.ll
vendor/lld/dist/test/ELF/lto/linkonce.ll
vendor/lld/dist/test/ELF/lto/ltopasses-basic.ll
vendor/lld/dist/test/ELF/lto/ltopasses-custom.ll
vendor/lld/dist/test/ELF/lto/metadata.ll
vendor/lld/dist/test/ELF/lto/parallel-internalize.ll
vendor/lld/dist/test/ELF/lto/parallel.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/type-merge.ll
vendor/lld/dist/test/ELF/lto/type-merge2.ll
vendor/lld/dist/test/ELF/lto/undefined-puts.ll
vendor/lld/dist/test/ELF/lto/unnamed-addr-comdat.ll
vendor/lld/dist/test/ELF/lto/unnamed-addr-lib.ll
vendor/lld/dist/test/ELF/lto/unnamed-addr.ll
vendor/lld/dist/test/ELF/lto/version-script.ll
vendor/lld/dist/test/ELF/merge-string-error.s
vendor/lld/dist/test/ELF/merge-string.s
vendor/lld/dist/test/ELF/merge.s
vendor/lld/dist/test/ELF/mips-32.s
vendor/lld/dist/test/ELF/mips-64-disp.s
vendor/lld/dist/test/ELF/mips-64-got.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.s
vendor/lld/dist/test/ELF/mips-got-and-copy.s
vendor/lld/dist/test/ELF/mips-got-redundant.s
vendor/lld/dist/test/ELF/mips-got-relocs.s
vendor/lld/dist/test/ELF/mips-got16.s
vendor/lld/dist/test/ELF/mips-gp-disp.s
vendor/lld/dist/test/ELF/mips-gp-local.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-npic-call-pic.s
vendor/lld/dist/test/ELF/mips-options-r.test
vendor/lld/dist/test/ELF/mips-options.s
vendor/lld/dist/test/ELF/mips-tls-64.s
vendor/lld/dist/test/ELF/mips-tls.s
vendor/lld/dist/test/ELF/no-inhibit-exec.s
vendor/lld/dist/test/ELF/no-obj.s
vendor/lld/dist/test/ELF/noplt-pie.s
vendor/lld/dist/test/ELF/phdr-align.s
vendor/lld/dist/test/ELF/pie.s
vendor/lld/dist/test/ELF/plt-aarch64.s
vendor/lld/dist/test/ELF/plt.s
vendor/lld/dist/test/ELF/ppc-relocs.s
vendor/lld/dist/test/ELF/pre_init_fini_array.s
vendor/lld/dist/test/ELF/pre_init_fini_array_missing.s
vendor/lld/dist/test/ELF/program-header-layout.s
vendor/lld/dist/test/ELF/relative-dynamic-reloc-ppc64.s
vendor/lld/dist/test/ELF/relative-dynamic-reloc.s
vendor/lld/dist/test/ELF/relocatable-symbols.s
vendor/lld/dist/test/ELF/relocatable.s
vendor/lld/dist/test/ELF/relocation-common.s
vendor/lld/dist/test/ELF/relocation-copy-flags.s
vendor/lld/dist/test/ELF/relocation-copy.s
vendor/lld/dist/test/ELF/relocation-i686.s
vendor/lld/dist/test/ELF/relocation-local.s
vendor/lld/dist/test/ELF/relocation-past-merge-end.s
vendor/lld/dist/test/ELF/relocation-relative-absolute.s
vendor/lld/dist/test/ELF/relocation-size-shared.s
vendor/lld/dist/test/ELF/relocation-size.s
vendor/lld/dist/test/ELF/relocation-undefined-weak.s
vendor/lld/dist/test/ELF/relocation.s
vendor/lld/dist/test/ELF/relro.s
vendor/lld/dist/test/ELF/reproduce-windows.s
vendor/lld/dist/test/ELF/reproduce.s
vendor/lld/dist/test/ELF/resolution.s
vendor/lld/dist/test/ELF/section-name.s
vendor/lld/dist/test/ELF/shared-be.s
vendor/lld/dist/test/ELF/shared.s
vendor/lld/dist/test/ELF/startstop-gccollect.s
vendor/lld/dist/test/ELF/startstop-shared.s
vendor/lld/dist/test/ELF/startstop.s
vendor/lld/dist/test/ELF/string-gc.s
vendor/lld/dist/test/ELF/string-table.s
vendor/lld/dist/test/ELF/symbol-override.s
vendor/lld/dist/test/ELF/symbols.s
vendor/lld/dist/test/ELF/sysroot.s
vendor/lld/dist/test/ELF/tls-got.s
vendor/lld/dist/test/ELF/tls-mismatch.s
vendor/lld/dist/test/ELF/tls-offset.s
vendor/lld/dist/test/ELF/tls-opt-gdie.s
vendor/lld/dist/test/ELF/tls-opt-local.s
vendor/lld/dist/test/ELF/tls-opt.s
vendor/lld/dist/test/ELF/tls-static.s
vendor/lld/dist/test/ELF/tls.s
vendor/lld/dist/test/ELF/undef-shared.s
vendor/lld/dist/test/ELF/undef-start.s
vendor/lld/dist/test/ELF/undef-version-script.s
vendor/lld/dist/test/ELF/undef-with-plt-addr.s
vendor/lld/dist/test/ELF/undef.s
vendor/lld/dist/test/ELF/undefined-opt.s
vendor/lld/dist/test/ELF/unresolved-symbols.s
vendor/lld/dist/test/ELF/verdef-defaultver.s
vendor/lld/dist/test/ELF/verdef-dependency.s
vendor/lld/dist/test/ELF/verdef.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-noundef.s
vendor/lld/dist/test/ELF/version-script.s
vendor/lld/dist/test/ELF/version-wildcard.test
vendor/lld/dist/test/ELF/visibility.s
vendor/lld/dist/test/ELF/weak-undef-shared.s
vendor/lld/dist/test/ELF/weak-undef.s
vendor/lld/dist/test/ELF/writable-merge.s
vendor/lld/dist/test/ELF/x86-64-dyn-rel-error.s
vendor/lld/dist/test/ELF/x86-64-dyn-rel-error2.s
vendor/lld/dist/test/ELF/x86-64-reloc-32-fpic.s
vendor/lld/dist/test/ELF/x86-64-reloc-error.s
vendor/lld/dist/test/ELF/x86-64-reloc-pc32-fpic.s
vendor/lld/dist/test/ELF/x86-64-reloc-range.s
vendor/lld/dist/test/ELF/zdefs.s
vendor/lld/dist/test/lit.cfg
vendor/lld/dist/test/mach-o/arm-interworking-movw.yaml
vendor/lld/dist/test/mach-o/arm-interworking.yaml
vendor/lld/dist/test/mach-o/arm-shims.yaml
vendor/lld/dist/test/mach-o/arm64-reloc-negDelta32-fixup.yaml
vendor/lld/dist/test/mach-o/arm64-relocs-errors-delta64-offset.yaml
vendor/lld/dist/test/mach-o/data-in-code-load-command.yaml
vendor/lld/dist/test/mach-o/data-only-dylib.yaml
vendor/lld/dist/test/mach-o/dead-strip-globals.yaml
vendor/lld/dist/test/mach-o/demangle.yaml
vendor/lld/dist/test/mach-o/dso_handle.yaml
vendor/lld/dist/test/mach-o/dylib-install-names.yaml
vendor/lld/dist/test/mach-o/eh-frame-relocs-arm64.yaml
vendor/lld/dist/test/mach-o/exe-offsets.yaml
vendor/lld/dist/test/mach-o/exe-segment-overlap.yaml
vendor/lld/dist/test/mach-o/executable-exports.yaml
vendor/lld/dist/test/mach-o/exported_symbols_list-dylib.yaml
vendor/lld/dist/test/mach-o/exported_symbols_list-undef.yaml
vendor/lld/dist/test/mach-o/fat-archive.yaml
vendor/lld/dist/test/mach-o/flat_namespace_undef_error.yaml
vendor/lld/dist/test/mach-o/flat_namespace_undef_suppress.yaml
vendor/lld/dist/test/mach-o/force_load-dylib.yaml
vendor/lld/dist/test/mach-o/force_load-x86_64.yaml
vendor/lld/dist/test/mach-o/function-starts-load-command.yaml
vendor/lld/dist/test/mach-o/gcc_except_tab-got-arm64.yaml
vendor/lld/dist/test/mach-o/got-order.yaml
vendor/lld/dist/test/mach-o/hello-world-arm64.yaml
vendor/lld/dist/test/mach-o/image-base.yaml
vendor/lld/dist/test/mach-o/interposing-section.yaml
vendor/lld/dist/test/mach-o/lazy-bind-x86_64.yaml
vendor/lld/dist/test/mach-o/library-order.yaml
vendor/lld/dist/test/mach-o/library-rescan.yaml
vendor/lld/dist/test/mach-o/linker-as-ld.yaml
vendor/lld/dist/test/mach-o/lit.local.cfg
vendor/lld/dist/test/mach-o/mh_bundle_header.yaml
vendor/lld/dist/test/mach-o/mh_dylib_header.yaml
vendor/lld/dist/test/mach-o/objc-category-list-atom.yaml
vendor/lld/dist/test/mach-o/objc_export_list.yaml
vendor/lld/dist/test/mach-o/order_file-basic.yaml
vendor/lld/dist/test/mach-o/parse-data-in-code-armv7.yaml
vendor/lld/dist/test/mach-o/parse-data-relocs-x86_64.yaml
vendor/lld/dist/test/mach-o/rpath.yaml
vendor/lld/dist/test/mach-o/run-tlv-pass-x86-64.yaml
vendor/lld/dist/test/mach-o/sectalign.yaml
vendor/lld/dist/test/mach-o/sectattrs.yaml
vendor/lld/dist/test/mach-o/source-version.yaml
vendor/lld/dist/test/mach-o/stack-size.yaml
vendor/lld/dist/test/mach-o/twolevel_namespace_undef_dynamic_lookup.yaml
vendor/lld/dist/test/mach-o/twolevel_namespace_undef_warning_suppress.yaml
vendor/lld/dist/test/mach-o/unwind-info-simple-arm64.yaml
vendor/lld/dist/test/mach-o/unwind-info-simple-x86_64.yaml
vendor/lld/dist/test/mach-o/upward-dylib-load-command.yaml
vendor/lld/dist/test/mach-o/version-min-load-command.yaml
vendor/lld/dist/tools/lld/CMakeLists.txt
vendor/lld/dist/tools/lld/lld.cpp
vendor/lld/dist/unittests/CMakeLists.txt
vendor/lld/dist/unittests/MachOTests/MachONormalizedFileBinaryWriterTests.cpp
Directory Properties:
vendor/lld/dist/test/Driver/Inputs/libtest.a (props changed)
vendor/lld/dist/test/Driver/Inputs/usr/lib/i386/libtest.a (props changed)
vendor/lld/dist/test/Driver/Inputs/usr/lib/libtest.a (props changed)
vendor/lld/dist/test/ELF/Inputs/discard-merge-unnamed.o (props changed)
vendor/lld/dist/test/ELF/Inputs/mips-gp-disp.so (props changed)
vendor/lld/dist/test/ELF/Inputs/no-symtab.o (props changed)
vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/lib/libmystatic.a (props changed)
vendor/lld/dist/test/mach-o/Inputs/lib-search-paths/usr/local/lib/file.o (props changed)
vendor/lld/dist/test/mach-o/Inputs/libbar.a (props changed)
vendor/lld/dist/test/mach-o/Inputs/libfoo.a (props changed)
Modified: vendor/lld/dist/CMakeLists.txt
==============================================================================
--- vendor/lld/dist/CMakeLists.txt Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/CMakeLists.txt Mon Jan 2 19:19:15 2017 (r311125)
@@ -1,3 +1,54 @@
+# Check if lld is built as a standalone project.
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ project(lld)
+ cmake_minimum_required(VERSION 3.4.3)
+
+ set(CMAKE_INCLUDE_CURRENT_DIR ON)
+ set(LLD_BUILT_STANDALONE TRUE)
+
+ find_program(LLVM_CONFIG_PATH "llvm-config" DOC "Path to llvm-config binary")
+ if(NOT LLVM_CONFIG_PATH)
+ message(FATAL_ERROR "llvm-config not found: specify LLVM_CONFIG_PATH")
+ endif()
+
+ execute_process(COMMAND "${LLVM_CONFIG_PATH}" "--obj-root" "--includedir"
+ RESULT_VARIABLE HAD_ERROR
+ OUTPUT_VARIABLE LLVM_CONFIG_OUTPUT
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(HAD_ERROR)
+ message(FATAL_ERROR "llvm-config failed with status ${HAD_ERROR}")
+ endif()
+
+ string(REGEX REPLACE "[ \t]*[\r\n]+[ \t]*" ";" LLVM_CONFIG_OUTPUT "${LLVM_CONFIG_OUTPUT}")
+
+ list(GET LLVM_CONFIG_OUTPUT 0 OBJ_ROOT)
+ list(GET LLVM_CONFIG_OUTPUT 1 MAIN_INCLUDE_DIR)
+
+ set(LLVM_OBJ_ROOT ${OBJ_ROOT} CACHE PATH "path to LLVM build tree")
+ set(LLVM_MAIN_INCLUDE_DIR ${MAIN_INCLUDE_DIR} CACHE PATH "path to llvm/include")
+
+ file(TO_CMAKE_PATH ${LLVM_OBJ_ROOT} LLVM_BINARY_DIR)
+ set(LLVM_CMAKE_PATH "${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX}/cmake/llvm")
+
+ if(NOT EXISTS "${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+ message(FATAL_ERROR "LLVMConfig.cmake not found")
+ endif()
+ include("${LLVM_CMAKE_PATH}/LLVMConfig.cmake")
+
+ list(APPEND CMAKE_MODULE_PATH "${LLVM_CMAKE_PATH}")
+
+ set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
+ include_directories("${LLVM_BINARY_DIR}/include" ${LLVM_INCLUDE_DIRS})
+ link_directories(${LLVM_LIBRARY_DIRS})
+
+ set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
+ find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" ${LLVM_TOOLS_BINARY_DIR} NO_DEFAULT_PATH)
+
+ include(AddLLVM)
+ include(TableGen)
+ include(HandleLLVMOptions)
+endif()
+
set(LLD_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(LLD_INCLUDE_DIR ${LLD_SOURCE_DIR}/include )
set(LLD_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -55,6 +106,8 @@ endif()
list (APPEND CMAKE_MODULE_PATH "${LLD_SOURCE_DIR}/cmake/modules")
+include(AddLLD)
+
option(LLD_USE_VTUNE
"Enable VTune user task tracking."
OFF)
@@ -67,6 +120,8 @@ if (LLD_USE_VTUNE)
endif()
endif()
+option(LLD_BUILD_TOOLS
+ "Build the lld tools. If OFF, just generate build targets." ON)
if (MSVC)
add_definitions(-wd4530) # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.'
@@ -87,12 +142,6 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
)
endif()
-macro(add_lld_library name)
- add_llvm_library(${name} ${ARGN})
- set_target_properties(${name} PROPERTIES FOLDER "lld libraries")
-endmacro(add_lld_library)
-
-
add_subdirectory(lib)
add_subdirectory(tools/lld)
Modified: vendor/lld/dist/COFF/CMakeLists.txt
==============================================================================
--- vendor/lld/dist/COFF/CMakeLists.txt Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/CMakeLists.txt Mon Jan 2 19:19:15 2017 (r311125)
@@ -2,6 +2,10 @@ set(LLVM_TARGET_DEFINITIONS Options.td)
tablegen(LLVM Options.inc -gen-opt-parser-defs)
add_public_tablegen_target(COFFOptionsTableGen)
+if(NOT LLD_BUILT_STANDALONE)
+ set(tablegen_deps intrinsics_gen)
+endif()
+
add_lld_library(lldCOFF
Chunks.cpp
DLL.cpp
@@ -14,6 +18,7 @@ add_lld_library(lldCOFF
MarkLive.cpp
ModuleDef.cpp
PDB.cpp
+ Strings.cpp
SymbolTable.cpp
Symbols.cpp
Writer.cpp
@@ -21,6 +26,9 @@ add_lld_library(lldCOFF
LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
Core
+ DebugInfoCodeView
+ DebugInfoMSF
+ DebugInfoPDB
LTO
LibDriver
Object
@@ -30,7 +38,11 @@ add_lld_library(lldCOFF
Option
Support
- LINK_LIBS ${PTHREAD_LIB}
- )
+ LINK_LIBS
+ lldCore
+ ${PTHREAD_LIB}
-add_dependencies(lldCOFF COFFOptionsTableGen intrinsics_gen)
+ DEPENDS
+ COFFOptionsTableGen
+ ${tablegen_deps}
+ )
Modified: vendor/lld/dist/COFF/Chunks.cpp
==============================================================================
--- vendor/lld/dist/COFF/Chunks.cpp Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/Chunks.cpp Mon Jan 2 19:19:15 2017 (r311125)
@@ -28,7 +28,7 @@ namespace lld {
namespace coff {
SectionChunk::SectionChunk(ObjectFile *F, const coff_section *H)
- : Chunk(SectionKind), Repl(this), File(F), Header(H),
+ : Chunk(SectionKind), Repl(this), Header(H), File(F),
Relocs(File->getCOFFObj()->getRelocations(Header)),
NumRelocs(std::distance(Relocs.begin(), Relocs.end())) {
// Initialize SectionName.
@@ -81,11 +81,23 @@ void SectionChunk::applyRelX86(uint8_t *
}
static void applyMOV(uint8_t *Off, uint16_t V) {
- or16(Off, ((V & 0x800) >> 1) | ((V >> 12) & 0xf));
- or16(Off + 2, ((V & 0x700) << 4) | (V & 0xff));
+ write16le(Off, (read16le(Off) & 0xfbf0) | ((V & 0x800) >> 1) | ((V >> 12) & 0xf));
+ write16le(Off + 2, (read16le(Off + 2) & 0x8f00) | ((V & 0x700) << 4) | (V & 0xff));
+}
+
+static uint16_t readMOV(uint8_t *Off) {
+ uint16_t Opcode1 = read16le(Off);
+ uint16_t Opcode2 = read16le(Off + 2);
+ uint16_t Imm = (Opcode2 & 0x00ff) | ((Opcode2 >> 4) & 0x0700);
+ Imm |= ((Opcode1 << 1) & 0x0800) | ((Opcode1 & 0x000f) << 12);
+ return Imm;
}
static 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);
+ V += Imm; // add the immediate offset
applyMOV(Off, V); // set MOVW operand
applyMOV(Off + 4, V >> 16); // set MOVT operand
}
@@ -99,11 +111,14 @@ static void applyBranch20T(uint8_t *Off,
}
static void applyBranch24T(uint8_t *Off, int32_t V) {
+ if (!isInt<25>(V))
+ fatal("relocation out of range");
uint32_t S = V < 0 ? 1 : 0;
uint32_t J1 = ((~V >> 23) & 1) ^ S;
uint32_t J2 = ((~V >> 22) & 1) ^ S;
or16(Off, (S << 10) | ((V >> 12) & 0x3ff));
- or16(Off + 2, (J1 << 13) | (J2 << 11) | ((V >> 1) & 0x7ff));
+ // Clear out the J1 and J2 bits which may be set.
+ write16le(Off + 2, (read16le(Off + 2) & 0xd000) | (J1 << 13) | (J2 << 11) | ((V >> 1) & 0x7ff));
}
void SectionChunk::applyRelARM(uint8_t *Off, uint16_t Type, Defined *Sym,
@@ -119,6 +134,7 @@ void SectionChunk::applyRelARM(uint8_t *
case IMAGE_REL_ARM_BRANCH20T: applyBranch20T(Off, S - P - 4); break;
case IMAGE_REL_ARM_BRANCH24T: applyBranch24T(Off, S - P - 4); break;
case IMAGE_REL_ARM_BLX23T: applyBranch24T(Off, S - P - 4); break;
+ case IMAGE_REL_ARM_SECREL: add32(Off, Sym->getSecrel()); break;
default:
fatal("unsupported relocation type");
}
@@ -134,7 +150,7 @@ void SectionChunk::writeTo(uint8_t *Buf)
// Apply relocations.
for (const coff_relocation &Rel : Relocs) {
uint8_t *Off = Buf + OutputSectionOff + Rel.VirtualAddress;
- SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex)->repl();
+ SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex);
Defined *Sym = cast<Defined>(Body);
uint64_t P = RVA + Rel.VirtualAddress;
switch (Config->Machine) {
@@ -187,7 +203,7 @@ void SectionChunk::getBaserels(std::vect
uint8_t Ty = getBaserelType(Rel);
if (Ty == IMAGE_REL_BASED_ABSOLUTE)
continue;
- SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex)->repl();
+ SymbolBody *Body = File->getSymbolBody(Rel.SymbolTableIndex);
if (isa<DefinedAbsolute>(Body))
continue;
Res->emplace_back(RVA + Rel.VirtualAddress, Ty);
@@ -210,7 +226,7 @@ void SectionChunk::printDiscardedMessage
// 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)
- llvm::outs() << "Discarded " << Sym->getName() << "\n";
+ outs() << "Discarded " << Sym->getName() << "\n";
}
StringRef SectionChunk::getDebugName() {
@@ -233,7 +249,7 @@ void SectionChunk::replace(SectionChunk
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), NextPowerOf2(Sym.getValue()));
+ Align = std::min(uint64_t(32), PowerOf2Ceil(Sym.getValue()));
}
uint32_t CommonChunk::getPermissions() const {
Modified: vendor/lld/dist/COFF/Chunks.h
==============================================================================
--- vendor/lld/dist/COFF/Chunks.h Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/Chunks.h Mon Jan 2 19:19:15 2017 (r311125)
@@ -17,7 +17,6 @@
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Object/COFF.h"
-#include <atomic>
#include <utility>
#include <vector>
@@ -29,7 +28,6 @@ using llvm::object::COFFSymbolRef;
using llvm::object::SectionRef;
using llvm::object::coff_relocation;
using llvm::object::coff_section;
-using llvm::sys::fs::file_magic;
class Baserel;
class Defined;
@@ -187,11 +185,12 @@ public:
// Auxiliary Format 5: Section Definitions. Used for ICF.
uint32_t Checksum = 0;
+ const coff_section *Header;
+
private:
// A file this chunk was created from.
ObjectFile *File;
- const coff_section *Header;
StringRef SectionName;
std::vector<SectionChunk *> AssocChildren;
llvm::iterator_range<const coff_relocation *> Relocs;
@@ -202,7 +201,7 @@ private:
// Used for ICF (Identical COMDAT Folding)
void replace(SectionChunk *Other);
- std::atomic<uint64_t> GroupID = { 0 };
+ uint32_t Color[2] = {0, 0};
// Sym points to a section symbol if this is a COMDAT chunk.
DefinedRegular *Sym = nullptr;
Modified: vendor/lld/dist/COFF/Config.h
==============================================================================
--- vendor/lld/dist/COFF/Config.h Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/Config.h Mon Jan 2 19:19:15 2017 (r311125)
@@ -26,7 +26,8 @@ using llvm::StringRef;
class DefinedAbsolute;
class DefinedRelative;
class StringChunk;
-class Undefined;
+struct Symbol;
+class SymbolBody;
// Short aliases.
static const auto AMD64 = llvm::COFF::IMAGE_FILE_MACHINE_AMD64;
@@ -37,7 +38,7 @@ static const auto I386 = llvm::COFF::IMA
struct Export {
StringRef Name; // N in /export:N or /export:E=N
StringRef ExtName; // E in /export:E=N
- Undefined *Sym = nullptr;
+ SymbolBody *Sym = nullptr;
uint16_t Ordinal = 0;
bool Noname = false;
bool Data = false;
@@ -61,6 +62,13 @@ struct Export {
}
};
+enum class DebugType {
+ None = 0x0,
+ CV = 0x1, /// CodeView
+ PData = 0x2, /// Procedure Data
+ Fixup = 0x4, /// Relocation Table
+};
+
// Global configuration.
struct Configuration {
enum ManifestKind { SideBySide, Embed, No };
@@ -69,7 +77,7 @@ struct Configuration {
llvm::COFF::MachineTypes Machine = IMAGE_FILE_MACHINE_UNKNOWN;
bool Verbose = false;
WindowsSubsystem Subsystem = llvm::COFF::IMAGE_SUBSYSTEM_UNKNOWN;
- Undefined *Entry = nullptr;
+ SymbolBody *Entry = nullptr;
bool NoEntry = false;
std::string OutputFile;
bool DoGC = true;
@@ -78,9 +86,11 @@ struct Configuration {
bool Force = false;
bool Debug = false;
bool WriteSymtab = true;
+ unsigned DebugTypes = static_cast<unsigned>(DebugType::None);
+ StringRef PDBPath;
// Symbols in this set are considered as live by the garbage collector.
- std::set<Undefined *> GCRoot;
+ std::set<SymbolBody *> GCRoot;
std::set<StringRef> NoDefaultLibs;
bool NoDefaultLibAll = false;
@@ -91,11 +101,11 @@ struct Configuration {
std::vector<Export> Exports;
std::set<std::string> DelayLoads;
std::map<std::string, int> DLLOrder;
- Undefined *DelayLoadHelper = nullptr;
+ SymbolBody *DelayLoadHelper = nullptr;
// Used for SafeSEH.
- DefinedRelative *SEHTable = nullptr;
- DefinedAbsolute *SEHCount = nullptr;
+ Symbol *SEHTable = nullptr;
+ Symbol *SEHCount = nullptr;
// Used for /opt:lldlto=N
unsigned LTOOptLevel = 2;
@@ -141,6 +151,10 @@ struct Configuration {
bool TerminalServerAware = true;
bool LargeAddressAware = false;
bool HighEntropyVA = false;
+
+ // This is for debugging.
+ bool DebugPdb = false;
+ bool DumpPdb = false;
};
extern Configuration *Config;
Modified: vendor/lld/dist/COFF/DLL.cpp
==============================================================================
--- vendor/lld/dist/COFF/DLL.cpp Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/DLL.cpp Mon Jan 2 19:19:15 2017 (r311125)
@@ -324,7 +324,7 @@ public:
if (E.ForwardChunk) {
write32le(P, E.ForwardChunk->getRVA());
} else {
- write32le(P, cast<Defined>(E.Sym->repl())->getRVA());
+ write32le(P, cast<Defined>(E.Sym)->getRVA());
}
}
}
Modified: vendor/lld/dist/COFF/Driver.cpp
==============================================================================
--- vendor/lld/dist/COFF/Driver.cpp Mon Jan 2 19:19:07 2017 (r311124)
+++ vendor/lld/dist/COFF/Driver.cpp Mon Jan 2 19:19:15 2017 (r311125)
@@ -7,15 +7,17 @@
//
//===----------------------------------------------------------------------===//
-#include "Config.h"
#include "Driver.h"
+#include "Config.h"
#include "Error.h"
#include "InputFiles.h"
+#include "Memory.h"
#include "SymbolTable.h"
#include "Symbols.h"
#include "Writer.h"
#include "lld/Driver/Driver.h"
#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/StringSwitch.h"
#include "llvm/LibDriver/LibDriver.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/ArgList.h"
@@ -28,6 +30,13 @@
#include <algorithm>
#include <memory>
+#ifdef _MSC_VER
+// <future> depends on <eh.h> for __uncaught_exception.
+#include <eh.h>
+#endif
+
+#include <future>
+
using namespace llvm;
using namespace llvm::COFF;
using llvm::sys::Process;
@@ -41,11 +50,13 @@ namespace coff {
Configuration *Config;
LinkerDriver *Driver;
-bool link(llvm::ArrayRef<const char *> Args) {
- Configuration C;
- LinkerDriver D;
- Config = &C;
- Driver = &D;
+BumpPtrAllocator BAlloc;
+StringSaver Saver{BAlloc};
+std::vector<SpecificAllocBase *> SpecificAllocBase::Instances;
+
+bool link(ArrayRef<const char *> Args) {
+ Config = make<Configuration>();
+ Driver = make<LinkerDriver>();
Driver->link(Args);
return true;
}
@@ -58,26 +69,123 @@ static std::string getOutputPath(StringR
return (S.substr(0, S.rfind('.')) + E).str();
}
-// Opens a file. Path has to be resolved already.
-// Newly created memory buffers are owned by this driver.
-MemoryBufferRef LinkerDriver::openFile(StringRef Path) {
- std::unique_ptr<MemoryBuffer> MB =
- check(MemoryBuffer::getFile(Path), "could not open " + Path);
- MemoryBufferRef MBRef = MB->getMemBufferRef();
- OwningMBs.push_back(std::move(MB)); // take ownership
+// ErrorOr is not default constructible, so it cannot be used as the type
+// parameter of a future.
+// FIXME: We could open the file in createFutureForFile and avoid needing to
+// return an error here, but for the moment that would cost us a file descriptor
+// (a limited resource on Windows) for the duration that the future is pending.
+typedef std::pair<std::unique_ptr<MemoryBuffer>, std::error_code> MBErrPair;
+
+// Create a std::future that opens and maps a file using the best strategy for
+// the host platform.
+static std::future<MBErrPair> createFutureForFile(std::string Path) {
+#if LLVM_ON_WIN32
+ // On Windows, file I/O is relatively slow so it is best to do this
+ // asynchronously.
+ auto Strategy = std::launch::async;
+#else
+ auto Strategy = std::launch::deferred;
+#endif
+ return std::async(Strategy, [=]() {
+ auto MBOrErr = MemoryBuffer::getFile(Path);
+ if (!MBOrErr)
+ return MBErrPair{nullptr, MBOrErr.getError()};
+ return MBErrPair{std::move(*MBOrErr), std::error_code()};
+ });
+}
+
+MemoryBufferRef LinkerDriver::takeBuffer(std::unique_ptr<MemoryBuffer> MB) {
+ MemoryBufferRef MBRef = *MB;
+ OwningMBs.push_back(std::move(MB));
+
+ if (Driver->Cpio)
+ Driver->Cpio->append(relativeToRoot(MBRef.getBufferIdentifier()),
+ MBRef.getBuffer());
+
return MBRef;
}
-static std::unique_ptr<InputFile> createFile(MemoryBufferRef MB) {
+void LinkerDriver::addBuffer(std::unique_ptr<MemoryBuffer> MB) {
+ MemoryBufferRef MBRef = takeBuffer(std::move(MB));
+
// File type is detected by contents, not by file extension.
- file_magic Magic = identify_magic(MB.getBuffer());
+ file_magic Magic = identify_magic(MBRef.getBuffer());
+ if (Magic == file_magic::windows_resource) {
+ Resources.push_back(MBRef);
+ return;
+ }
+
+ FilePaths.push_back(MBRef.getBufferIdentifier());
if (Magic == file_magic::archive)
- return std::unique_ptr<InputFile>(new ArchiveFile(MB));
+ return Symtab.addFile(make<ArchiveFile>(MBRef));
if (Magic == file_magic::bitcode)
- return std::unique_ptr<InputFile>(new BitcodeFile(MB));
+ return Symtab.addFile(make<BitcodeFile>(MBRef));
+ if (Magic == file_magic::coff_cl_gl_object)
+ fatal(MBRef.getBufferIdentifier() + ": is not a native COFF file. "
+ "Recompile without /GL");
+ Symtab.addFile(make<ObjectFile>(MBRef));
+}
+
+void LinkerDriver::enqueuePath(StringRef Path) {
+ auto Future =
+ std::make_shared<std::future<MBErrPair>>(createFutureForFile(Path));
+ std::string PathStr = Path;
+ enqueueTask([=]() {
+ auto MBOrErr = Future->get();
+ if (MBOrErr.second)
+ fatal(MBOrErr.second, "could not open " + PathStr);
+ Driver->addBuffer(std::move(MBOrErr.first));
+ });
+
if (Config->OutputFile == "")
- Config->OutputFile = getOutputPath(MB.getBufferIdentifier());
- return std::unique_ptr<InputFile>(new ObjectFile(MB));
+ Config->OutputFile = getOutputPath(Path);
+}
+
+void LinkerDriver::addArchiveBuffer(MemoryBufferRef MB, StringRef SymName,
+ StringRef ParentName) {
+ file_magic Magic = identify_magic(MB.getBuffer());
+ if (Magic == file_magic::coff_import_library) {
+ Symtab.addFile(make<ImportFile>(MB));
+ return;
+ }
+
+ InputFile *Obj;
+ if (Magic == file_magic::coff_object)
+ Obj = make<ObjectFile>(MB);
+ else if (Magic == file_magic::bitcode)
+ Obj = make<BitcodeFile>(MB);
+ else
+ fatal("unknown file type: " + MB.getBufferIdentifier());
+
+ Obj->ParentName = ParentName;
+ Symtab.addFile(Obj);
+ if (Config->Verbose)
+ outs() << "Loaded " << toString(Obj) << " for " << SymName << "\n";
+}
+
+void LinkerDriver::enqueueArchiveMember(const Archive::Child &C,
+ StringRef SymName,
+ StringRef ParentName) {
+ if (!C.getParent()->isThin()) {
+ MemoryBufferRef MB = check(
+ C.getMemoryBufferRef(),
+ "could not get the buffer for the member defining symbol " + SymName);
+ enqueueTask([=]() { Driver->addArchiveBuffer(MB, SymName, ParentName); });
+ return;
+ }
+
+ auto Future = std::make_shared<std::future<MBErrPair>>(createFutureForFile(
+ 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);
+ Driver->addArchiveBuffer(takeBuffer(std::move(MBOrErr.first)), SymName,
+ ParentName);
+ });
}
static bool isDecorated(StringRef Sym) {
@@ -87,7 +195,7 @@ static bool isDecorated(StringRef Sym) {
// Parses .drectve section contents and returns a list of files
// specified by /defaultlib.
void LinkerDriver::parseDirectives(StringRef S) {
- llvm::opt::InputArgList Args = Parser.parse(S);
+ opt::InputArgList Args = Parser.parse(S);
for (auto *Arg : Args) {
switch (Arg->getOption().getID()) {
@@ -95,10 +203,8 @@ void LinkerDriver::parseDirectives(Strin
parseAlternateName(Arg->getValue());
break;
case OPT_defaultlib:
- if (Optional<StringRef> Path = findLib(Arg->getValue())) {
- MemoryBufferRef MB = openFile(*Path);
- Symtab.addFile(createFile(MB));
- }
+ if (Optional<StringRef> Path = findLib(Arg->getValue()))
+ enqueuePath(*Path);
break;
case OPT_export: {
Export E = parseExport(Arg->getValue());
@@ -135,19 +241,19 @@ void LinkerDriver::parseDirectives(Strin
// Find file from search paths. You can omit ".obj", this function takes
// care of that. Note that the returned path is not guaranteed to exist.
StringRef LinkerDriver::doFindFile(StringRef Filename) {
- bool hasPathSep = (Filename.find_first_of("/\\") != StringRef::npos);
- if (hasPathSep)
+ bool HasPathSep = (Filename.find_first_of("/\\") != StringRef::npos);
+ if (HasPathSep)
return Filename;
- bool hasExt = (Filename.find('.') != StringRef::npos);
+ bool HasExt = (Filename.find('.') != StringRef::npos);
for (StringRef Dir : SearchPaths) {
SmallString<128> Path = Dir;
- llvm::sys::path::append(Path, Filename);
- if (llvm::sys::fs::exists(Path.str()))
- return Alloc.save(Path.str());
- if (!hasExt) {
+ sys::path::append(Path, Filename);
+ if (sys::fs::exists(Path.str()))
+ return Saver.save(Path.str());
+ if (!HasExt) {
Path.append(".obj");
- if (llvm::sys::fs::exists(Path.str()))
- return Alloc.save(Path.str());
+ if (sys::fs::exists(Path.str()))
+ return Saver.save(Path.str());
}
}
return Filename;
@@ -166,9 +272,9 @@ Optional<StringRef> LinkerDriver::findFi
// Find library file from search path.
StringRef LinkerDriver::doFindLib(StringRef Filename) {
// Add ".lib" to Filename if that has no file extension.
- bool hasExt = (Filename.find('.') != StringRef::npos);
- if (!hasExt)
- Filename = Alloc.save(Filename + ".lib");
+ bool HasExt = (Filename.find('.') != StringRef::npos);
+ if (!HasExt)
+ Filename = Saver.save(Filename + ".lib");
return doFindFile(Filename);
}
@@ -178,11 +284,12 @@ StringRef LinkerDriver::doFindLib(String
Optional<StringRef> LinkerDriver::findLib(StringRef Filename) {
if (Config->NoDefaultLibAll)
return None;
+ if (!VisitedLibs.insert(Filename.lower()).second)
+ return None;
StringRef Path = doFindLib(Filename);
if (Config->NoDefaultLibs.count(Path))
return None;
- bool Seen = !VisitedFiles.insert(Path.lower()).second;
- if (Seen)
+ if (!VisitedFiles.insert(Path.lower()).second)
return None;
return Path;
}
@@ -192,7 +299,7 @@ void LinkerDriver::addLibSearchPaths() {
Optional<std::string> EnvOpt = Process::GetEnv("LIB");
if (!EnvOpt.hasValue())
return;
- StringRef Env = Alloc.save(*EnvOpt);
+ StringRef Env = Saver.save(*EnvOpt);
while (!Env.empty()) {
StringRef Path;
std::tie(Path, Env) = Env.split(';');
@@ -200,17 +307,17 @@ void LinkerDriver::addLibSearchPaths() {
}
}
-Undefined *LinkerDriver::addUndefined(StringRef Name) {
- Undefined *U = Symtab.addUndefined(Name);
- Config->GCRoot.insert(U);
- return U;
+SymbolBody *LinkerDriver::addUndefined(StringRef Name) {
+ SymbolBody *B = Symtab.addUndefined(Name);
+ Config->GCRoot.insert(B);
+ return B;
}
// Symbol names are mangled by appending "_" prefix on x86.
StringRef LinkerDriver::mangle(StringRef Sym) {
assert(Config->Machine != IMAGE_FILE_MACHINE_UNKNOWN);
if (Config->Machine == I386)
- return Alloc.save("_" + Sym);
+ return Saver.save("_" + Sym);
return Sym;
}
@@ -225,7 +332,7 @@ StringRef LinkerDriver::findDefaultEntry
};
for (auto E : Entries) {
StringRef Entry = Symtab.findMangle(mangle(E[0]));
- if (!Entry.empty() && !isa<Undefined>(Symtab.find(Entry)->Body))
+ if (!Entry.empty() && !isa<Undefined>(Symtab.find(Entry)->body()))
return mangle(E[1]);
}
return "";
@@ -247,7 +354,83 @@ static uint64_t getDefaultImageBase() {
return Config->DLL ? 0x10000000 : 0x400000;
}
-void LinkerDriver::link(llvm::ArrayRef<const char *> ArgsArr) {
+static std::string createResponseFile(const opt::InputArgList &Args,
+ ArrayRef<StringRef> FilePaths,
+ ArrayRef<StringRef> SearchPaths) {
+ SmallString<0> Data;
+ raw_svector_ostream OS(Data);
+
+ for (auto *Arg : Args) {
+ switch (Arg->getOption().getID()) {
+ case OPT_linkrepro:
+ case OPT_INPUT:
+ case OPT_defaultlib:
+ case OPT_libpath:
+ break;
+ default:
+ OS << stringize(Arg) << "\n";
+ }
+ }
+
+ for (StringRef Path : SearchPaths) {
+ std::string RelPath = relativeToRoot(Path);
+ OS << "/libpath:" << quote(RelPath) << "\n";
+ }
+
+ for (StringRef Path : FilePaths)
+ OS << quote(relativeToRoot(Path)) << "\n";
+
+ return Data.str();
+}
+
+static unsigned getDefaultDebugType(const opt::InputArgList &Args) {
+ unsigned DebugTypes = static_cast<unsigned>(DebugType::CV);
+ if (Args.hasArg(OPT_driver))
+ DebugTypes |= static_cast<unsigned>(DebugType::PData);
+ if (Args.hasArg(OPT_profile))
+ DebugTypes |= static_cast<unsigned>(DebugType::Fixup);
+ return DebugTypes;
+}
+
+static unsigned parseDebugType(StringRef Arg) {
+ SmallVector<StringRef, 3> Types;
+ Arg.split(Types, ',', /*KeepEmpty=*/false);
+
+ unsigned DebugTypes = static_cast<unsigned>(DebugType::None);
+ for (StringRef Type : Types)
+ DebugTypes |= StringSwitch<unsigned>(Type.lower())
+ .Case("cv", static_cast<unsigned>(DebugType::CV))
+ .Case("pdata", static_cast<unsigned>(DebugType::PData))
+ .Case("fixup", static_cast<unsigned>(DebugType::Fixup));
+ return DebugTypes;
+}
+
+static std::string getMapFile(const opt::InputArgList &Args) {
+ auto *Arg = Args.getLastArg(OPT_lldmap, OPT_lldmap_file);
+ if (!Arg)
+ return "";
+ if (Arg->getOption().getID() == OPT_lldmap_file)
+ return Arg->getValue();
+
+ assert(Arg->getOption().getID() == OPT_lldmap);
+ StringRef OutFile = Config->OutputFile;
+ return (OutFile.substr(0, OutFile.rfind('.')) + ".map").str();
+}
+
+void LinkerDriver::enqueueTask(std::function<void()> Task) {
+ TaskQueue.push_back(std::move(Task));
+}
+
+bool LinkerDriver::run() {
+ bool DidWork = !TaskQueue.empty();
+ while (!TaskQueue.empty()) {
+ TaskQueue.front()();
+ TaskQueue.pop_front();
+ }
+ return DidWork;
+}
+
+void LinkerDriver::link(ArrayRef<const char *> ArgsArr) {
// If the first command line argument is "/lib", link.exe acts like lib.exe.
// We call our own implementation of lib.exe that understands bitcode files.
if (ArgsArr.size() > 1 && StringRef(ArgsArr[1]).equals_lower("/lib")) {
@@ -257,15 +440,15 @@ void LinkerDriver::link(llvm::ArrayRef<c
}
// Needed for LTO.
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargets();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllAsmPrinters();
- llvm::InitializeAllDisassemblers();
+ InitializeAllTargetInfos();
+ InitializeAllTargets();
+ InitializeAllTargetMCs();
+ InitializeAllAsmParsers();
+ InitializeAllAsmPrinters();
+ InitializeAllDisassemblers();
// Parse command line options.
- llvm::opt::InputArgList Args = Parser.parseLINK(ArgsArr.slice(1));
+ opt::InputArgList Args = Parser.parseLINK(ArgsArr.slice(1));
// Handle /help
if (Args.hasArg(OPT_help)) {
@@ -273,6 +456,17 @@ void LinkerDriver::link(llvm::ArrayRef<c
return;
}
+ if (auto *Arg = Args.getLastArg(OPT_linkrepro)) {
+ SmallString<64> Path = StringRef(Arg->getValue());
+ sys::path::append(Path, "repro");
+ ErrorOr<CpioFile *> F = CpioFile::create(Path);
+ if (F)
+ Cpio.reset(*F);
+ else
+ errs() << "/linkrepro: failed to open " << Path
+ << ".cpio: " << F.getError().message() << '\n';
+ }
+
if (Args.filtered_begin(OPT_INPUT) == Args.filtered_end())
fatal("no input files");
@@ -295,8 +489,17 @@ void LinkerDriver::link(llvm::ArrayRef<c
Config->Force = true;
// Handle /debug
- if (Args.hasArg(OPT_debug))
+ if (Args.hasArg(OPT_debug)) {
Config->Debug = true;
+ Config->DebugTypes =
+ Args.hasArg(OPT_debugtype)
+ ? parseDebugType(Args.getLastArg(OPT_debugtype)->getValue())
+ : getDefaultDebugType(Args);
+ }
+
+ // Create a dummy PDB file to satisfy build sytem rules.
+ if (auto *Arg = Args.getLastArg(OPT_pdb))
+ Config->PDBPath = Arg->getValue();
// Handle /noentry
if (Args.hasArg(OPT_noentry)) {
@@ -447,72 +650,43 @@ void LinkerDriver::link(llvm::ArrayRef<c
Config->TerminalServerAware = false;
if (Args.hasArg(OPT_nosymtab))
Config->WriteSymtab = false;
+ Config->DumpPdb = Args.hasArg(OPT_dumppdb);
+ Config->DebugPdb = Args.hasArg(OPT_debugpdb);
// Create a list of input files. Files can be given as arguments
// for /defaultlib option.
- std::vector<StringRef> Paths;
std::vector<MemoryBufferRef> MBs;
for (auto *Arg : Args.filtered(OPT_INPUT))
if (Optional<StringRef> Path = findFile(Arg->getValue()))
- Paths.push_back(*Path);
+ enqueuePath(*Path);
for (auto *Arg : Args.filtered(OPT_defaultlib))
if (Optional<StringRef> Path = findLib(Arg->getValue()))
- Paths.push_back(*Path);
- for (StringRef Path : Paths)
- MBs.push_back(openFile(Path));
+ enqueuePath(*Path);
// Windows specific -- Create a resource file containing a manifest file.
- if (Config->Manifest == Configuration::Embed) {
- std::unique_ptr<MemoryBuffer> MB = createManifestRes();
- MBs.push_back(MB->getMemBufferRef());
- OwningMBs.push_back(std::move(MB)); // take ownership
+ if (Config->Manifest == Configuration::Embed)
+ addBuffer(createManifestRes());
+
+ // Read all input files given via the command line.
+ run();
+
+ // We should have inferred a machine type by now from the input files, but if
+ // not we assume x64.
+ if (Config->Machine == IMAGE_FILE_MACHINE_UNKNOWN) {
+ errs() << "warning: /machine is not specified. x64 is assumed.\n";
+ Config->Machine = AMD64;
}
// Windows specific -- Input files can be Windows resource files (.res files).
// We invoke cvtres.exe to convert resource files to a regular COFF file
// then link the result file normally.
- std::vector<MemoryBufferRef> Resources;
- auto NotResource = [](MemoryBufferRef MB) {
- return identify_magic(MB.getBuffer()) != file_magic::windows_resource;
- };
- auto It = std::stable_partition(MBs.begin(), MBs.end(), NotResource);
- if (It != MBs.end()) {
- Resources.insert(Resources.end(), It, MBs.end());
- MBs.erase(It, MBs.end());
- }
-
- // Read all input files given via the command line. Note that step()
- // doesn't read files that are specified by directive sections.
- for (MemoryBufferRef MB : MBs)
- Symtab.addFile(createFile(MB));
- Symtab.step();
-
- // Determine machine type and check if all object files are
- // for the same CPU type. Note that this needs to be done before
- // any call to mangle().
- for (std::unique_ptr<InputFile> &File : Symtab.getFiles()) {
- MachineTypes MT = File->getMachineType();
- if (MT == IMAGE_FILE_MACHINE_UNKNOWN)
- continue;
- if (Config->Machine == IMAGE_FILE_MACHINE_UNKNOWN) {
- Config->Machine = MT;
- continue;
- }
- if (Config->Machine != MT)
- fatal(File->getShortName() + ": machine type " + machineToStr(MT) +
- " conflicts with " + machineToStr(Config->Machine));
- }
- if (Config->Machine == IMAGE_FILE_MACHINE_UNKNOWN) {
- llvm::errs() << "warning: /machine is not specified. x64 is assumed.\n";
- Config->Machine = AMD64;
- }
+ if (!Resources.empty())
+ addBuffer(convertResToCOFF(Resources));
- // Windows specific -- Convert Windows resource files to a COFF file.
- if (!Resources.empty()) {
- std::unique_ptr<MemoryBuffer> MB = convertResToCOFF(Resources);
- Symtab.addFile(createFile(MB->getMemBufferRef()));
- OwningMBs.push_back(std::move(MB)); // take ownership
- }
+ if (Cpio)
+ Cpio->append("response.txt",
+ createResponseFile(Args, FilePaths,
+ ArrayRef<StringRef>(SearchPaths).slice(1)));
// Handle /largeaddressaware
if (Config->is64() || Args.hasArg(OPT_largeaddressaware))
@@ -537,7 +711,7 @@ void LinkerDriver::link(llvm::ArrayRef<c
fatal("entry point must be defined");
Config->Entry = addUndefined(S);
if (Config->Verbose)
- llvm::outs() << "Entry name inferred: " << S << "\n";
+ outs() << "Entry name inferred: " << S << "\n";
}
// Handle /export
@@ -545,18 +719,19 @@ void LinkerDriver::link(llvm::ArrayRef<c
Export E = parseExport(Arg->getValue());
if (Config->Machine == I386) {
if (!isDecorated(E.Name))
- E.Name = Alloc.save("_" + E.Name);
+ E.Name = Saver.save("_" + E.Name);
if (!E.ExtName.empty() && !isDecorated(E.ExtName))
- E.ExtName = Alloc.save("_" + E.ExtName);
+ E.ExtName = Saver.save("_" + E.ExtName);
}
Config->Exports.push_back(E);
}
// Handle /def
if (auto *Arg = Args.getLastArg(OPT_deffile)) {
- MemoryBufferRef MB = openFile(Arg->getValue());
// parseModuleDefs mutates Config object.
- parseModuleDefs(MB, &Alloc);
+ parseModuleDefs(
+ takeBuffer(check(MemoryBuffer::getFile(Arg->getValue()),
+ Twine("could not open ") + Arg->getValue())));
}
// Handle /delayload
@@ -585,14 +760,10 @@ void LinkerDriver::link(llvm::ArrayRef<c
Symtab.addAbsolute(mangle("__guard_fids_count"), 0);
Symtab.addAbsolute(mangle("__guard_flags"), 0x100);
- // Read as much files as we can from directives sections.
- Symtab.run();
-
- // Resolve auxiliary symbols until we get a convergence.
- // (Trying to resolve a symbol may trigger a Lazy symbol to load a new file.
- // A new file may contain a directive section to add new command line options.
- // That's why we have to repeat until converge.)
- for (;;) {
+ // This code may add new undefined symbols to the link, which may enqueue more
+ // symbol resolution tasks, so we need to continue executing tasks until we
+ // converge.
+ do {
// Windows specific -- if entry point is not found,
// search for its mangled names.
if (Config->Entry)
@@ -615,7 +786,7 @@ void LinkerDriver::link(llvm::ArrayRef<c
Symbol *Sym = Symtab.find(From);
if (!Sym)
continue;
- if (auto *U = dyn_cast<Undefined>(Sym->Body))
+ if (auto *U = dyn_cast<Undefined>(Sym->body()))
if (!U->WeakAlias)
U->WeakAlias = Symtab.addUndefined(To);
}
@@ -623,18 +794,15 @@ void LinkerDriver::link(llvm::ArrayRef<c
// Windows specific -- if __load_config_used can be resolved, resolve it.
if (Symtab.findUnderscore("_load_config_used"))
addUndefined(mangle("_load_config_used"));
-
- if (Symtab.queueEmpty())
- break;
- Symtab.run();
- }
+ } while (run());
// Do LTO by compiling bitcode input files to a set of native COFF files then
// link those files.
Symtab.addCombinedLTOObjects();
+ run();
// Make sure we have resolved all symbols.
- Symtab.reportRemainingUndefines(/*Resolve=*/true);
+ Symtab.reportRemainingUndefines();
// Windows specific -- if no /subsystem is given, we need to infer
// that from entry point name.
@@ -662,10 +830,6 @@ void LinkerDriver::link(llvm::ArrayRef<c
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-all
mailing list