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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 15:44:32 PDT 2022


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-objdump/Offloading/binary.test:7
 # RUN: yaml2obj %s -o %t.elf
-# RUN: llvm-objcopy --add-section .llvm.offloading=%t.bin %t.elf
-# RUN: llvm-objcopy --set-section-alignment .llvm.offloading=8 %t.elf
+# RUN: llvm-objcopy --update-section .llvm.offloading=%t.bin %t.elf
 # RUN: llvm-objdump --offloading %t.elf | FileCheck %s --check-prefixes=CHECK,ELF --match-full-lines --strict-whitespace --implicit-check-not={{.}}
----------------
jhenderson wrote:
> jhuber6 wrote:
> > jhenderson wrote:
> > > FWIW, you might want to consider whether it would be useful for llvm-objcopy to be able to create an SHT_LLVM_OFFLOADING section using --set-section-flags, or even by a direct recognition of the name (I imagine it isn't worth it though).
> > I was expecting `llvm-objcopy` to have some sort of `--set-section-type` functionality, maybe that could be added in.
> I don't think I'd be opposed to the idea - it seems much more flexible than the --set-section-flags option.
I am preparing a patch to add --set-section-type to llvm-objcopy. There was a previous need changing .init_array.N to SHT_INIT_ARRAY. I worked around the issue by using GNU objcopy. Since there are similar needs, maybe time to add it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129053/new/

https://reviews.llvm.org/D129053



More information about the llvm-commits mailing list