freebsd-nq/contrib/llvm/tools/lld
Dimitry Andric f7e8f5d439 Pull in r365760 from upstream lld trunk (by Fangrui Song):
[ELF] Handle non-glob patterns before glob patterns in version
  scripts & fix a corner case of --dynamic-list

  This fixes PR38549, which is silently accepted by ld.bfd.
  This seems correct because it makes sense to let non-glob patterns
  take precedence over glob patterns.

  lld issues an error because
  `assignWildcardVersion(ver, VER_NDX_LOCAL);` is processed before
  `assignExactVersion(ver, v.id, v.name);`.

  Move all assignWildcardVersion() calls after assignExactVersion()
  calls to fix this.

  Also, move handleDynamicList() to the bottom. computeBinding() called
  by includeInDynsym() has this cryptic rule:

      if (versionId == VER_NDX_LOCAL && isDefined() && !isPreemptible)
	return STB_LOCAL;

  Before the change:

  * foo's version is set to VER_NDX_LOCAL due to `local: *`
  * handleDynamicList() is called
    - foo.computeBinding() is STB_LOCAL
    - foo.includeInDynsym() is false
    - foo.isPreemptible is not set (wrong)
  * foo's version is set to V1

  After the change:

  * foo's version is set to VER_NDX_LOCAL due to `local: *`
  * foo's version is set to V1
  * handleDynamicList() is called
    - foo.computeBinding() is STB_GLOBAL
    - foo.includeInDynsym() is true
    - foo.isPreemptible is set (correct)

  Reviewed By: ruiu

  Differential Revision: https://reviews.llvm.org/D64550

This makes it longer necessary to patch the version scripts for the
samba ports, to avoid "duplicate symbol 'pdb_search_init' in version
script" errors.

PR:		230602
MFC after:	3 days
2019-07-13 15:04:30 +00:00
..
COFF Upgrade our copies of clang, llvm, lld, lldb, compiler-rt, libc++, 2019-06-12 21:10:37 +00:00
Common Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
docs Pull in r352826 from upstream lld trunk (by Fangrui Song): 2019-03-20 20:57:11 +00:00
ELF Pull in r365760 from upstream lld trunk (by Fangrui Song): 2019-07-13 15:04:30 +00:00
include/lld Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
lib Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
tools/lld Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
.arcconfig Merge lld trunk r321017 to contrib/llvm/tools/lld. 2017-12-20 15:50:21 +00:00
.clang-format
.gitignore
CMakeLists.txt Merge lld trunk r321017 to contrib/llvm/tools/lld. 2017-12-20 15:50:21 +00:00
CODE_OWNERS.TXT Merge lld trunk r321017 to contrib/llvm/tools/lld. 2017-12-20 15:50:21 +00:00
FREEBSD-Xlist Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
LICENSE.TXT Merge lld trunk r351319, resolve conflicts, and update FREEBSD-Xlist. 2019-01-20 14:42:59 +00:00
README.md Merge lld trunk r321414 to contrib/llvm/tools/lld. 2017-12-24 01:11:19 +00:00

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.

Benchmarking

In order to make sure various developers can evaluate patches over the same tests, we create a collection of self contained programs.

It is hosted at https://s3-us-west-2.amazonaws.com/linker-tests/lld-speed-test.tar.xz

The current sha256 is 10eec685463d5a8bbf08d77f4ca96282161d396c65bd97dc99dbde644a31610f.