[all-commits] [llvm/llvm-project] 0ab663: [Libomptarget] Move ELF symbol extraction to the E...

Joseph Huber via All-commits all-commits at lists.llvm.org
Thu Dec 14 09:04:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0ab663d2023a3187423d19ed8e7b631b7ace6168
      https://github.com/llvm/llvm-project/commit/0ab663d2023a3187423d19ed8e7b631b7ace6168
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2023-12-14 (Thu, 14 Dec 2023)

  Changed paths:
    M openmp/libomptarget/plugins-nextgen/common/include/GlobalHandler.h
    M openmp/libomptarget/plugins-nextgen/common/src/GlobalHandler.cpp
    M openmp/libomptarget/plugins-nextgen/common/src/Utils/ELF.cpp
    M openmp/libomptarget/plugins-nextgen/common/src/Utils/ELF.h

  Log Message:
  -----------
  [Libomptarget] Move ELF symbol extraction to the ELF utility (#74717)

Summary:
We shouldn't have the format specific ELF handling in the generic plugin
manager. This patch moves that out of the implementation and into the
ELF utilities. This patch changes the SHT_NOBITS case to be a hard
error, which should be correct as the existing use already seemed to
return an error if the result was a null pointer.

This also uses a `const_cast`, which is bad practice. However,
rebuilding the `constness` of all of this would be a massive overhaul,
and this matches the previous behaviour (We would take a pointer to the
image that is most likely read-only in the ELF).




More information about the All-commits mailing list