summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2016-06-17 22:38:08 +0000
committerTom Stellard <thomas.stellard@amd.com>2016-06-17 22:38:08 +0000
commitf8db61c5f0655a121441204f5d258a6d64729de0 (patch)
tree109b0af5dd91f6f3ba2722c5075a61e7bb3b952e /llvm/test/Object
parent1544e657b202bedc3a08f2418235828190899fd7 (diff)
downloadbcm5719-llvm-f8db61c5f0655a121441204f5d258a6d64729de0.tar.gz
bcm5719-llvm-f8db61c5f0655a121441204f5d258a6d64729de0.zip
Support/ELF: Add AMDGPU relocation definitions to match documentation
Reviewers: arsenm, kzhuravl, rafael Subscribers: llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21443 llvm-svn: 273066
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/AMDGPU/elf64-relocs.yaml65
1 files changed, 65 insertions, 0 deletions
diff --git a/llvm/test/Object/AMDGPU/elf64-relocs.yaml b/llvm/test/Object/AMDGPU/elf64-relocs.yaml
new file mode 100644
index 00000000000..8ccf25b8605
--- /dev/null
+++ b/llvm/test/Object/AMDGPU/elf64-relocs.yaml
@@ -0,0 +1,65 @@
+# RUN: yaml2obj -format=elf %s > %t
+# RUN: llvm-readobj -r %t | FileCheck %s
+
+# CHECK: Relocations [
+# CHECK: Section (2) .rela.text {
+# CHECK: 0x0 R_AMDGPU_NONE main 0x0
+# CHECK: 0x8 R_AMDGPU_ABS32_LO - 0x0
+# CHECK: 0x10 R_AMDGPU_ABS32_HI - 0x0
+# CHECK: 0x18 R_AMDGPU_ABS64 - 0x0
+# CHECK: 0x20 R_AMDGPU_REL32 - 0x0
+# CHECK: 0x28 R_AMDGPU_REL64 - 0x0
+# CHECK: 0x30 R_AMDGPU_ABS32 - 0x0
+# CHECK: }
+# CHECK: ]
+
+FileHeader:
+ Class: ELFCLASS64
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_AMDGPU
+Sections:
+ - Type: SHT_PROGBITS
+ Name: .text
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x08
+ Content: 0000000000000000
+ - Type: SHT_RELA
+ Name: .rela.text
+ Link: .symtab
+ Info: .text
+ AddressAlign: 0x08
+ Relocations:
+ - Offset: 0x0
+ Symbol: main
+ Type: R_AMDGPU_NONE
+ - Offset: 0x8
+ Symbol: a
+ Type: R_AMDGPU_ABS32_LO
+ - Offset: 0x10
+ Symbol: b
+ Type: R_AMDGPU_ABS32_HI
+ - Offset: 0x18
+ Symbol: c
+ Type: R_AMDGPU_ABS64
+ - Offset: 0x20
+ Symbol: d
+ Type: R_AMDGPU_REL32
+ - Offset: 0x28
+ Symbol: e
+ Type: R_AMDGPU_REL64
+ - Offset: 0x30
+ Symbol: f
+ Type: R_AMDGPU_ABS32
+
+Symbols:
+ Local:
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+
+ Global:
+ - Name: main
+ Type: STT_FUNC
+ Section: .text
+ Size: 0x08
OpenPOWER on IntegriCloud