[PATCH] D129053: [llvm-objdump] Update offload dumping to use SHT_LLVM_OFFLOADING

Joseph Huber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 3 15:56:12 PDT 2022


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, tianshilei1992, MaskRay, yaxunl, tra, saiislam, alexander-shaposhnikov, jhenderson, JonChesterfield.
Herald added subscribers: StephenFan, rupprecht.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

In order to be more in-line with ELF semantics, a previous patch added
support for a new ELF section type to indicate if a section contains
offloading data. This allows us to now check using this rather than
checking the section name directly. This patch updates the logic to
check the type now instead.

I chose to make this emit a warning if the input is not an ELF-object
file. I could have made the logic fall-back to the section name, but
this offloading in LLVM is currently not supported on any other targets
so it's probably best to emit a warning until we improve support.

Depends on D129052 <https://reviews.llvm.org/D129052>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129053

Files:
  llvm/test/tools/llvm-objdump/Offloading/binary.test
  llvm/test/tools/llvm-objdump/Offloading/content-failure.test
  llvm/test/tools/llvm-objdump/Offloading/failure.test
  llvm/test/tools/llvm-objdump/Offloading/non-elf.test
  llvm/test/tools/llvm-objdump/Offloading/warning.test
  llvm/tools/llvm-objdump/OffloadDump.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129053.441985.patch
Type: text/x-patch
Size: 4893 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220703/8f09fefa/attachment.bin>


More information about the llvm-commits mailing list