llvm-project/llvm/lib/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
..
Archive.cpp [Object] Skip section offset checking for /<XFGHASHMAP>/ 2022-03-02 13:29:35 +02:00
ArchiveWriter.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
Binary.cpp [CUDA] Add CUDA fatbinary magic 2022-03-14 20:08:31 -04:00
CMakeLists.txt [Object] Add binary format for bundling offloading metadata 2022-04-14 10:50:52 -04:00
COFFImportFile.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
COFFModuleDefinition.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
COFFObjectFile.cpp [Object] [COFF] Improve error messages 2022-03-02 10:44:41 +02:00
Decompressor.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
ELF.cpp [llvm-objdump] --private-headers: change errors to warnings for dynamic section dumping 2022-03-28 01:00:43 -07:00
ELFObjectFile.cpp [AMDGPU] Add gfx1036 target 2022-03-02 23:26:38 +00:00
Error.cpp
FaultMapParser.cpp
IRObjectFile.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
IRSymtab.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
MachOObjectFile.cpp [dsymutil] Apply relocations present in Swift reflection sections 2022-03-17 14:23:20 -03:00
MachOUniversal.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
MachOUniversalWriter.cpp Apply clang-tidy fixes for readability-redundant-smartptr-get in MachOUniversalWriter.cpp (NFC) 2022-03-28 09:18:35 -07:00
Minidump.cpp
ModuleSymbolTable.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
Object.cpp [llvm] Cleanup header dependencies in ADT and Support 2022-01-21 13:54:49 +01:00
ObjectFile.cpp [dsymutil] Apply relocations present in Swift reflection sections 2022-03-17 14:23:20 -03:00
OffloadBinary.cpp [Object] Add binary format for bundling offloading metadata 2022-04-14 10:50:52 -04:00
RecordStreamer.cpp
RecordStreamer.h
RelocationResolver.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
SymbolSize.cpp [llvm-objdump][XCOFF] Enable the -l (--line-numbers) option. 2021-06-10 04:37:06 +00:00
SymbolicFile.cpp Cleanup includes: DebugInfo & CodeGen 2022-03-12 17:26:40 +01:00
TapiFile.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
TapiUniversal.cpp Apply clang-tidy fixes for readability-redundant-smartptr-get in TapiUniversal.cpp (NFC) 2022-03-28 09:18:36 -07:00
WasmObjectFile.cpp [WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349 2022-03-15 11:36:56 -07:00
WindowsMachineFlag.cpp
WindowsResource.cpp Cleanup LLVMObject headers 2022-02-10 21:13:44 +01:00
XCOFFObjectFile.cpp [llvm-objcopy] Initial XCOFF32 support. 2022-02-28 04:59:46 -05:00