[all-commits] [llvm/llvm-project] 75404e: [JITLink] Introduce new weakly-referenced concept ...

lhames via All-commits all-commits at lists.llvm.org
Sun Sep 25 21:09:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 75404e9ef88335d502dc3cf9b5d4f666563cd0c1
      https://github.com/llvm/llvm-project/commit/75404e9ef88335d502dc3cf9b5d4f666563cd0c1
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-09-25 (Sun, 25 Sep 2022)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
    M llvm/lib/ExecutionEngine/JITLink/COFFLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/ELF_aarch64.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp

  Log Message:
  -----------
  [JITLink] Introduce new weakly-referenced concept separate from linkage.

Introduces two new methods on Symbol: isWeaklyReferenced and
setWeaklyReferenced. These are now used to track/set whether an external symbol
is weakly referenced, rather than having the Symbol's linkage set to weak.

This change is a first step towards proper handling of weak defs used across
JITDylib boundaries: It frees up the Linkage field on external symbols so that
it can be used to represent the linkage of the definition that the symbol resolves
to. It is expected that Platform plugins will use this information to track
locations that need to be updated if the selected weak definition changes (e.g.
because JITDylibs were dlclosed and then dlopened again in a different order).




More information about the All-commits mailing list