[all-commits] [llvm/llvm-project] f448d4: [ORC][ORC-RT][MachO] Use _objc_(map|load)_images f...

lhames via All-commits all-commits at lists.llvm.org
Sat Apr 8 15:54:15 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f448d44663a5aab02eba650b486d31e00eab4599
      https://github.com/llvm/llvm-project/commit/f448d44663a5aab02eba650b486d31e00eab4599
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-04-08 (Sat, 08 Apr 2023)

  Changed paths:
    M compiler-rt/lib/orc/macho_platform.cpp
    A compiler-rt/test/orc/TestCases/Darwin/arm64/objc-category.S
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    M llvm/include/llvm/ExecutionEngine/Orc/Shared/ObjectFormats.h
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/Shared/ObjectFormats.cpp

  Log Message:
  -----------
  [ORC][ORC-RT][MachO] Use _objc_(map|load)_images for ObjC & Swift registration.

This patch drops the individual registration calls to the ObjC and Swift
runtimes (for selectors, classes, etc.), and instead creates a Mach header and
load commands that can be passed to _objc_map_images and _objc_load_images to
trigger registration and execution of +load methods. This approach supports
categories (for which there is no current registration API), and more closely
follows dyld's ObjC & Swift registration path.




More information about the All-commits mailing list