aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ELF.cpp
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2022-07-03 16:46:31 -0400
committerJoseph Huber <jhuber6@vols.utk.edu>2022-07-07 12:20:30 -0400
commit1d2ce4da8414de8775c134eb1c7e2c9436b443df (patch)
tree2d15a16236c6a41f7a4e141f0d781045f278c909 /llvm/lib/Object/ELF.cpp
parented801ad5e5fef76c4303d04fd8de21662b428bee (diff)
downloadllvm-1d2ce4da8414de8775c134eb1c7e2c9436b443df.zip
llvm-1d2ce4da8414de8775c134eb1c7e2c9436b443df.tar.gz
llvm-1d2ce4da8414de8775c134eb1c7e2c9436b443df.tar.bz2
[Object] Add ELF section type for offloading objects
Currently we use the `.llvm.offloading` section to store device-side objects inside the host, creating a fat binary. The contents of these sections is currently determined by the name of the section while it should ideally be determined by its type. This patch adds the new `SHT_LLVM_OFFLOADING` section type to the ELF section types. Which should make it easier to identify this specific data format. Reviewed By: jhenderson Differential Revision: https://reviews.llvm.org/D129052
Diffstat (limited to 'llvm/lib/Object/ELF.cpp')
-rw-r--r--llvm/lib/Object/ELF.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/ELF.cpp b/llvm/lib/Object/ELF.cpp
index 6acf454..0d5aa91 100644
--- a/llvm/lib/Object/ELF.cpp
+++ b/llvm/lib/Object/ELF.cpp
@@ -297,6 +297,7 @@ StringRef llvm::object::getELFSectionTypeName(uint32_t Machine, unsigned Type) {
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_PART_PHDR);
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_BB_ADDR_MAP_V0);
STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_BB_ADDR_MAP);
+ STRINGIFY_ENUM_CASE(ELF, SHT_LLVM_OFFLOADING);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_ATTRIBUTES);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_HASH);
STRINGIFY_ENUM_CASE(ELF, SHT_GNU_verdef);