diff options
| author | George Rimar <grimar@accesssoftek.com> | 2017-06-30 10:31:03 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2017-06-30 10:31:03 +0000 |
| commit | 892c6c86ea25dc97668ff1f1b7bf1108e85fa5ec (patch) | |
| tree | 6ad2216a756dad28292e48b524a8c251c328fd2b /llvm/test/Object | |
| parent | aad84e2ee2431e5e4ef4e30d642c3a95146b4e1c (diff) | |
| download | bcm5719-llvm-892c6c86ea25dc97668ff1f1b7bf1108e85fa5ec.tar.gz bcm5719-llvm-892c6c86ea25dc97668ff1f1b7bf1108e85fa5ec.zip | |
[YAML] - Teach yaml2obj/obj2yaml to work with numeric relocation values.
That may be useful if we want to produce or parse object containing
broken relocation values using yaml2obj/obj2yaml.
Previously that was impossible because only enum values were parsed
correctly, this patch allows to put any numeric value as a
relocation type.
Differential revision: https://reviews.llvm.org/D34758
llvm-svn: 306814
Diffstat (limited to 'llvm/test/Object')
| -rw-r--r-- | llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml b/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml new file mode 100644 index 00000000000..edd5dbce123 --- /dev/null +++ b/llvm/test/Object/X86/yaml-elf-x86-rel-broken.yaml @@ -0,0 +1,29 @@ +# RUN: yaml2obj %s > %t +# RUN: obj2yaml %t | FileCheck %s + +# CHECK: Relocations: +# CHECK-NEXT: - Offset: +# CHECK-NEXT: Symbol: +# CHECK-NEXT: Type: 0x000000FF + +!ELF +FileHeader: + Class: ELFCLASS32 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_386 +Sections: + - Type: SHT_PROGBITS + Name: .text + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + AddressAlign: 0x04 + Content: 0000000000000000 + - Type: SHT_REL + Name: .rel.text + Link: .symtab + Info: .text + AddressAlign: 0x04 + Relocations: + - Offset: 0 + Symbol: main + Type: 0xFF |

