[Openmp-commits] [PATCH] D99553: [libomptarget] Read standard notes for ELF offload images

Vyacheslav Zakharin via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Mon Mar 29 16:19:37 PDT 2021


vzakhari created this revision.
vzakhari added a project: OpenMP.
Herald added subscribers: kerbowa, mgorny, nhaehnle, jvesely.
vzakhari requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.

This patch is a piece of D99360 <https://reviews.llvm.org/D99360>.

The patch implements an ELF light interface for the plugins to be able to ierate ELF notes in //SHT/PT_NOTE// sections/segments. One implementation is based on //libelf// and it can be used for platforms, where libelf depdency can be easily satisfied. The second implementation is based on //LLVM ELFObjectFile// and requires in-tree build - this one can be used on Windows, etc.

Debug output from the plugins would look like this:

> TARGET Common ELF --> LLVMOMPOFFLOAD ELF note NT_LLVM_OPENMP_OFFLOAD_VERSION with value: '1.0'
> TARGET Common ELF --> LLVMOMPOFFLOAD ELF note NT_LLVM_OPENMP_OFFLOAD_PRODUCER with value: 'LLVM'
> TARGET Common ELF --> LLVMOMPOFFLOAD ELF note NT_LLVM_OPENMP_OFFLOAD_PRODUCER_VERSION with value: '13.0.0git 9f8975163c75b1f9f736f9a8e0a60e29ac062754'


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99553

Files:
  openmp/libomptarget/plugins/amdgpu/CMakeLists.txt
  openmp/libomptarget/plugins/common/elf_common/CMakeLists.txt
  openmp/libomptarget/plugins/common/elf_common/elf_common.cpp
  openmp/libomptarget/plugins/common/elf_common/elf_common.h
  openmp/libomptarget/plugins/common/elf_common/elf_constants.h
  openmp/libomptarget/plugins/common/elf_common/elf_light.cpp
  openmp/libomptarget/plugins/common/elf_common/elf_light.h
  openmp/libomptarget/plugins/remote/server/CMakeLists.txt
  openmp/libomptarget/test/offloading/llvmompoffload_notes.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99553.334011.patch
Type: text/x-patch
Size: 60305 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210329/25357e4f/attachment-0001.bin>


More information about the Openmp-commits mailing list