[ORC-RT][ORC] Introduce ELF/*nix Platform and runtime support.
authorLang Hames <lhames@gmail.com>
Wed, 18 Aug 2021 00:47:21 +0000 (10:47 +1000)
committerLang Hames <lhames@gmail.com>
Wed, 18 Aug 2021 05:00:22 +0000 (15:00 +1000)
commite256445bfff12013c3c4ad97da4aa69d25b175b5
treece9b3654f569b9f6f2d50de4947c4dfcbc2427dc
parent4ade3af13305931df6aef7bf8bedeaae284e2890
[ORC-RT][ORC] Introduce ELF/*nix Platform and runtime support.

This change adds support to ORCv2 and the Orc runtime library for static
initializers, C++ static destructors, and exception handler registration for
ELF-based platforms, at present Linux and FreeBSD on x86_64. It is based on the
MachO platform and runtime support introduced in bb5f97e3ad1.

Patch by Peter Housel. Thanks very much Peter!

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D108081
19 files changed:
compiler-rt/lib/orc/CMakeLists.txt
compiler-rt/lib/orc/elfnix_platform.cpp [new file with mode: 0644]
compiler-rt/lib/orc/elfnix_platform.h [new file with mode: 0644]
compiler-rt/test/orc/CMakeLists.txt
compiler-rt/test/orc/TestCases/FreeBSD/lit.local.cfg.py [new file with mode: 0644]
compiler-rt/test/orc/TestCases/FreeBSD/x86-64/lit.local.cfg.py [new file with mode: 0644]
compiler-rt/test/orc/TestCases/FreeBSD/x86-64/trivial-cxa-atexit.S [new file with mode: 0644]
compiler-rt/test/orc/TestCases/FreeBSD/x86-64/trivial-static-initializer.S [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Linux/lit.local.cfg.py [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Linux/x86-64/lit.local.cfg.py [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-cxa-atexit.S [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Linux/x86-64/trivial-static-initializer.S [new file with mode: 0644]
compiler-rt/test/orc/lit.cfg.py
llvm/include/llvm/ExecutionEngine/Orc/ELFNixPlatform.h [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/ELFNixPlatform.cpp [new file with mode: 0644]
llvm/lib/ExecutionEngine/Orc/Mangling.cpp
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp