diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2022-07-03 16:46:31 -0400 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2022-07-07 12:20:30 -0400 |
commit | 1d2ce4da8414de8775c134eb1c7e2c9436b443df (patch) | |
tree | 2d15a16236c6a41f7a4e141f0d781045f278c909 /llvm/test/ObjectYAML | |
parent | ed801ad5e5fef76c4303d04fd8de21662b428bee (diff) | |
download | llvm-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/test/ObjectYAML')
-rw-r--r-- | llvm/test/ObjectYAML/ELF/sht-offloading.yaml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/test/ObjectYAML/ELF/sht-offloading.yaml b/llvm/test/ObjectYAML/ELF/sht-offloading.yaml new file mode 100644 index 0000000..b234b96 --- /dev/null +++ b/llvm/test/ObjectYAML/ELF/sht-offloading.yaml @@ -0,0 +1,28 @@ +# RUN: yaml2obj %s -o %t +# RUN: llvm-readobj --sections %t | FileCheck -check-prefix=OBJ %s +# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s + +--- !ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL +Sections: + - Name: .llvm.offloading + Type: SHT_LLVM_OFFLOADING + Flags: [ SHF_EXCLUDE ] + +# OBJ: Sections [ +# OBJ: Section { +# OBJ: Index: 1 +# OBJ-NEXT: Name: .llvm.offloading (1) +# OBJ-NEXT: Type: SHT_LLVM_OFFLOADING (0x6FFF4C0B) +# OBJ-NEXT: Flags [ (0x80000000) +# OBJ-NEXT: SHF_EXCLUDE (0x80000000) +# OBJ-NEXT: ] + + +# YAML: Sections: +# YAML-NEXT: - Name: .llvm.offloading +# YAML-NEXT: Type: SHT_LLVM_OFFLOADING +# YAML-NEXT: Flags: [ SHF_EXCLUDE ] |