[all-commits] [llvm/llvm-project] 667ea2: [ELF] Merge verdefIndex into versionId. NFC (#72208)

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Nov 14 10:20:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 667ea2ca408bbfb29f6d138b6c758542e329b2c5
      https://github.com/llvm/llvm-project/commit/667ea2ca408bbfb29f6d138b6c758542e329b2c5
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-11-14 (Tue, 14 Nov 2023)

  Changed paths:
    M lld/ELF/InputFiles.cpp
    M lld/ELF/Relocations.cpp
    M lld/ELF/SymbolTable.cpp
    M lld/ELF/Symbols.h
    M lld/ELF/SyntheticSections.cpp

  Log Message:
  -----------
  [ELF] Merge verdefIndex into versionId. NFC (#72208)

The two fields are similar.

`versionId` is the Verdef index in the output file. It is set for
version script patterns and `sym at ver` symbols.

`verdefIndex` is the Verdef index of a SharedSymbol. The default value
-1 is also used to indicate that the symbol has not been matched by a
version script pattern (https://reviews.llvm.org/D65716).

It seems confusing to have two fields. Merge them so that we can
allocate one bit for #70130 (suppress --no-allow-shlib-undefined
error in the presence of a DSO definition).




More information about the All-commits mailing list