A previous patch added support for extracting images from offloading
binaries. Users may wish to extract these files from the file types they
are most commonly emebedded in, such as an ELF or bitcode. This can be
difficult for the user to do manually, as these could be stored in
different section names potentially. This patch addsp support for
extracting these file types.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Should these be merged into a public interface via Object/OffloadBinary.h?
I'm all for consolidating relevant code.
Basically it would be a free function doing that extractFromBuffer does here. I would also need to define a wrapper around OwningBinary<OffloadBinary> as that's what I use in the linker wrapper.
I'm not sure if it would be easier to consolidate this before or after this patch.
before or after this patch.
That would be your call. I personally would be biased towards doing refactoring early. Once something is in place, the temptation not to fix what already works might win.
clang/tools/clang-offload-packager/ClangOffloadPackager.cpp | ||
---|---|---|
17–21 | Are these include files necessary? I do not see code changes that need new include files. Or they were missing before? |
Are these include files necessary? I do not see code changes that need new include files. Or they were missing before?