[all-commits] [llvm/llvm-project] e7673d: [ORC] Force linking of eh-frame registration funct...

lhames via All-commits all-commits at lists.llvm.org
Sun Oct 23 13:56:09 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e7673d982dc7ad8f848d79d6e457bf614ec1564f
      https://github.com/llvm/llvm-project/commit/e7673d982dc7ad8f848d79d6e457bf614ec1564f
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-10-23 (Sun, 23 Oct 2022)

  Changed paths:
    M llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/LLJITWithThinLTOSummaries.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

  Log Message:
  -----------
  [ORC] Force linking of eh-frame registration functions from LLJIT.cpp.

Since aedeb8d5570, which switched to EPC-based eh-frame registrationin LLJIT,
the eh-frame registration functions need to be forcibly linked into the target
process.

Failure to link the eh-frame registration functions triggered a test failure in
https://green.lab.llvm.org/green/job/clang-stage1-RA/31497, which was fixed by
forcibly linking the registration functions into that test case in saf2b2214b4
(rdar://101083784), however it has also caused some tests (e.g. the C API unit
tests) that depend on successful construction of an LLJIT instance to be
skipped.

Moving the forcible registration into LLJIT.cpp fixes the general issue.


  Commit: 56af226b63f86ed1317020ebfe7f8bdd6704998f
      https://github.com/llvm/llvm-project/commit/56af226b63f86ed1317020ebfe7f8bdd6704998f
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-10-23 (Sun, 23 Oct 2022)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h
    M llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp

  Log Message:
  -----------
  [ORC] Reset MaterializationUnit::InitSymbol if the init symbol is discarded.

Discarding the init symbol is expected to be uncommon (it represents metadata
in the MaterializationUnit that is relevant to dlopen, and this will not
usually be fully duplicated in some other location), however if a client has
marked an InitSymbol as weak and it is selected to be discarded then we should
keep the data structure consistent.


Compare: https://github.com/llvm/llvm-project/compare/c8ca8fb9789a...56af226b63f8


More information about the All-commits mailing list