summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2014-05-07 17:06:38 +0000
committerSimon Atanasyan <simon@atanasyan.com>2014-05-07 17:06:38 +0000
commit68f61501564ba357dde521c33c35513e552ab299 (patch)
tree836287a67be15ac8e517aad2570e2eb50918bdad /llvm/test/Object
parent764ac3677dfe3ed8bbf8b96ceb6dbfea4ecfc432 (diff)
downloadbcm5719-llvm-68f61501564ba357dde521c33c35513e552ab299.tar.gz
bcm5719-llvm-68f61501564ba357dde521c33c35513e552ab299.zip
[yaml2obj] Support ELF x86 relocations.
llvm-svn: 208228
Diffstat (limited to 'llvm/test/Object')
-rw-r--r--llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml43
1 files changed, 43 insertions, 0 deletions
diff --git a/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml b/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
new file mode 100644
index 00000000000..a86c3764335
--- /dev/null
+++ b/llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml
@@ -0,0 +1,43 @@
+# RUN: yaml2obj -format=elf %s > %t
+# RUN: llvm-readobj -r %t | FileCheck %s
+
+# CHECK: Relocations [
+# CHECK-NEXT: Section (2) .rel.text {
+# CHECK-NEXT: 0x0 R_386_32 main 0x0
+# CHECK-NEXT: }
+# CHECK-NEXT: ]
+
+FileHeader:
+ Class: ELFCLASS32
+ Data: ELFDATA2LSB
+ Type: ET_REL
+ Machine: EM_386
+Sections:
+ - Type: SHT_PROGBITS
+ Name: .text
+ Type: SHT_PROGBITS
+ Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
+ AddressAlign: 0x04
+ Content: 0000000000000000
+ - Type: SHT_REL
+ Name: .rel.text
+ Type: SHT_REL
+ Link: .symtab
+ Info: .text
+ AddressAlign: 0x04
+ Relocations:
+ - Offset: 0
+ Symbol: main
+ Type: R_386_32
+
+Symbols:
+ Local:
+ - Name: .text
+ Type: STT_SECTION
+ Section: .text
+
+ Global:
+ - Name: main
+ Type: STT_FUNC
+ Section: .text
+ Size: 0x08
OpenPOWER on IntegriCloud