This patchs adds the necessary code for inspecting or creating offloading
binaries using the standing obj2yaml and yaml2obj features in LLVM.
Depends on D127774
Differential D127776
[ObjectYAML] Add offloading binary implementations for obj2yaml and yaml2obj jhuber6 on Jun 14 2022, 12:41 PM. Authored by
Details This patchs adds the necessary code for inspecting or creating offloading Depends on D127774
Diff Detail
Event TimelineComment Actions Have you got any reference material that I can read for the format of offloading binaries? I can't really review that this implementation does the right thing without knowing the format!
Comment Actions Sure, it's documented here https://clang.llvm.org/docs/ClangOffloadPackager.html. More or less, it's just a few integers followed by a list of offsets into an Elf-like string table that forms a string map.
Comment Actions Add tweaking of specific binary features and add a test to make sure we handle it explicitly.
Comment Actions LGTM.
|
I'd rather expect these two to be enums that correspond to the IMG and OFK values in the spec, with the option of specifying an arbitrary uint16_t value so that you can provide arbitrary values that don't have a defined mapping (this is a common pattern in ELF yaml2obj, for example).