[Openmp-commits] [PATCH] D131401: [Libomptarget] Replace libelf with LLVM's Elf libraries
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Mon Aug 8 08:17:25 PDT 2022
JonChesterfield requested changes to this revision.
JonChesterfield added a comment.
This revision now requires changes to proceed.
Started reading this but it's too large to get through now. Please remove the template layer over different types of elf.
================
Comment at: openmp/libomptarget/plugins/amdgpu/impl/system.cpp:173
+template <typename ELFT>
static std::pair<unsigned char *, unsigned char *>
----------------
shouldn't be templated
================
Comment at: openmp/libomptarget/plugins/amdgpu/impl/system.cpp:225
+
+ if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(ElfOrErr->get()))
+ return findMetadata(*ELFObj);
----------------
Not this please. There's only one type of elf it could be.
================
Comment at: openmp/libomptarget/plugins/amdgpu/src/rtl.cpp:1585
- uint32_t Flags = Eh64->e_flags;
-
- elf_end(E);
- DP("ELF Flags: 0x%x\n", Flags);
- return Flags;
+ if (const auto *ELFObj = dyn_cast<ELF32LEObjectFile>(ElfOrErr->get()))
+ return ELFObj->getPlatformFlags();
----------------
also no
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131401/new/
https://reviews.llvm.org/D131401
More information about the Openmp-commits
mailing list