FreeBSD/src f7e8f5d (r349971)contrib/llvm/tools/lld/ELF SymbolTable.cpp SymbolTable.h

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
DeltaFile
+18-22contrib/llvm/tools/lld/ELF/SymbolTable.cpp
+0-1contrib/llvm/tools/lld/ELF/SymbolTable.h
+18-232 files

UnifiedSplitRaw

FreeBSD/src 3499713 (r181990)usr.sbin/ndiscvt inf.c

MFC r178214

 If the .inf file did not have a Default entry for the registry key then write
 out a blank value and close the brackets on the ndis_regvals array.
DeltaFile
+3-1usr.sbin/ndiscvt/inf.c
+3-11 files

UnifiedSplitRaw