[all-commits] [llvm/llvm-project] 47e9e5: [ORC][ORC-RT][MachO] Reset __data and __common sec...

lhames via All-commits all-commits at lists.llvm.org
Fri Sep 16 13:40:36 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47e9e588083493414d0abfbe33fe3566879c219b
      https://github.com/llvm/llvm-project/commit/47e9e588083493414d0abfbe33fe3566879c219b
  Author: Lang Hames <lhames at gmail.com>
  Date:   2022-09-16 (Fri, 16 Sep 2022)

  Changed paths:
    M compiler-rt/lib/orc/macho_platform.cpp
    A compiler-rt/test/orc/TestCases/Darwin/x86-64/jit-re-dlopen-data-reset.S
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/MapperJITLinkMemoryManager.cpp

  Log Message:
  -----------
  [ORC][ORC-RT][MachO] Reset __data and __common sections on library close.

If we want to be able to close and then re-open a library then we need to reset
the data section states when the library is closed. This commit updates
MachOPlatform and the ORC runtime to track __data and __common sections, and
reset the state in MachOPlatformRuntimeState::dlcloseDeinitialize.

This is only a first step to full support -- there are other data sections that
we're not capturing, and we'll probably want a more efficient representation
for the sections (rather than passing their string name over IPC), but this is
a reasonable first step.

This commit also contains a fix to MapperJITLinkMemoryManager that prevents it
from calling OnDeallocated twice in the case of an error.




More information about the All-commits mailing list