[PATCH] D129507: [llvm-objcopy] Add option to dump embedded offloading images

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 13 00:33:27 PDT 2022


jhenderson added a comment.

I'm not familiar with some of the mentioned tools, but I tend to agree with @MaskRay's conclusions.

1. The functionality doesn't really fit in llvm-objcopy because the tool is intended for modifying a file in-place or making a (modified) copy to another place, neither of which is what you'll actually want it for. I think it //would// be appropriate for extracting the offloading section from an ELF binary as a whole, since that would basically just be --dump-section. Ideally, we'd have the ability to extract by section type, not just section name, but that's getting out-of-scope for this discussion.

2. llvm-objdump shouldn't be writing things to a file (or producing "binary" output that is intended for piping directly to a file). It's goal is printing information about object files. It is appropriate for it to be able to dump the offloading sections in an interpreted format, but not to extract them.

That means the functionality needs adding to a different tool, I feel (whether that tool is a new one or an existing one, I don't know).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D129507



More information about the llvm-commits mailing list