llvm-project/clang/tools/clang-linker-wrapper
Joseph Huber 080022d8ed [LinkerWrapper] Embed OffloadBinaries for OpenMP offloading images
The OpenMP offloading runtine currently uses an array of linked
offloading images. One downside to this is that we cannot know the
architecture or triple associated with the given image. In this patch,
instead of embedding the image itself, we embed an offloading binary
instead. This binary is simply a binary format that wraps around the
original linked image to provide some additional metadata. This will
allow us to support offloading to multiple architecture, or performing
future JIT compilation inside of the runtime, more clearly.
Additionally, these can be placed at a special section such that the
supported architectures can be identified using objdump with the support
from D126904. This needs to be stored in a new section name
`.llvm.offloading.images` because the `.llvm.offloading` section
implicitly uses the `SHF_EXCLUDE` flag and will always be stripped.

This patch does not contain the necessary code to parse these in
libomptarget.

Depends on D127246

Reviewed By: saiislam

Differential Revision: https://reviews.llvm.org/D127304
2022-07-21 13:20:01 -04:00
..
CMakeLists.txt [LinkerWrapper][NFC] Rework command line argument handling in the linker wrapper 2022-07-08 11:18:38 -04:00
ClangLinkerWrapper.cpp [LinkerWrapper] Embed OffloadBinaries for OpenMP offloading images 2022-07-21 13:20:01 -04:00
LinkerWrapperOpts.td [LinkerWrapper] Rework passing args to the LLVM backend 2022-07-18 12:44:15 -04:00
OffloadWrapper.cpp [LinkerWrapper] Embed OffloadBinaries for OpenMP offloading images 2022-07-21 13:20:01 -04:00
OffloadWrapper.h [HIP] Add support for handling HIP in the linker wrapper 2022-07-11 15:49:23 -04:00