[all-commits] [llvm/llvm-project] 93d08a: [clang-offload-wrapper] Add standard notes for ELF...

vzakhari via All-commits all-commits at lists.llvm.org
Mon Aug 16 13:20:26 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 93d08acaacec951dbb302f77eeae51974985b6b2
      https://github.com/llvm/llvm-project/commit/93d08acaacec951dbb302f77eeae51974985b6b2
  Author: Vyacheslav Zakharin <vyacheslav.p.zakharin at intel.com>
  Date:   2021-08-16 (Mon, 16 Aug 2021)

  Changed paths:
    A clang/test/Driver/Inputs/empty-elf-template.yaml
    M clang/test/Driver/clang-offload-wrapper.c
    M clang/tools/clang-offload-wrapper/CMakeLists.txt
    M clang/tools/clang-offload-wrapper/ClangOffloadWrapper.cpp

  Log Message:
  -----------
  [clang-offload-wrapper] Add standard notes for ELF offload images

The patch adds ELF notes into SHT_NOTE sections of ELF offload images
passed to clang-offload-wrapper.

The new notes use a null-terminated "LLVMOMPOFFLOAD" note name.
There are currently three types of notes:

VERSION: a string (not null-terminated) representing the ELF offload
image structure. The current version '1.0' does not put any restrictions
on the structure of the image. If we ever need to come up with a common
structure for ELF offload images (e.g. to be able to analyze the images
in libomptarget in some standard way), then we will introduce new versions.

PRODUCER: a vendor specific name of the producing toolchain.
Upstream LLVM uses "LLVM" (not null-terminated).

PRODUCER_VERSION: a vendor specific version of the producing toolchain.
Upstream LLVM uses LLVM_VERSION_STRING with optional <space> LLVM_REVISION.

All three notes are not mandatory currently.

Differential Revision: https://reviews.llvm.org/D99551




More information about the All-commits mailing list