llvm-project/llvm/unittests/Object
Joseph Huber e471ba3d01 [Object] Add binary format for bundling offloading metadata
We need to embed certain metadata along with a binary image when we wish
to perform a device-linking job on it. Currently this metadata was
embedded in the section name of the data itself. This worked, but made
adding new metadata very difficult and didn't work if the user did any
sort of section linking.

This patch introduces a custom binary format for bundling offloading
metadata with a device object file. This binary format is fundamentally
a simple string map table with some additional data and an embedded
image. I decided to use a custom format rather than using an existing
format (ELF, JSON, etc) because of the specialty use-case of this. We
need a simple binary format that can be concatenated without requiring
other external dependencies.

This extension will make it easier to extend the linker wrapper's
capabilties with whatever data is necessary. Eventually this will allow
us to remove all the external arguments passed to the linker wrapper and
embed it directly in the host's linker so device linking behaves exactly
like host linking.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D122069
2022-04-14 10:50:52 -04:00
..
ArchiveTest.cpp
CMakeLists.txt [Object] Add binary format for bundling offloading metadata 2022-04-14 10:50:52 -04:00
ELFObjectFileTest.cpp [LoongArch 2/6] Add ELF machine flag and relocs for upcoming LoongArch target 2022-02-10 10:23:34 +00:00
ELFTest.cpp [LoongArch 2/6] Add ELF machine flag and relocs for upcoming LoongArch target 2022-02-10 10:23:34 +00:00
ELFTypesTest.cpp
MinidumpTest.cpp
ObjectFileTest.cpp
OffloadingTest.cpp [Object] Add binary format for bundling offloading metadata 2022-04-14 10:50:52 -04:00
SymbolSizeTest.cpp
SymbolicFileTest.cpp
XCOFFObjectFileTest.cpp [XCOFF] Improve error message context. 2021-10-11 02:52:20 +00:00