From 68f61501564ba357dde521c33c35513e552ab299 Mon Sep 17 00:00:00 2001 From: Simon Atanasyan Date: Wed, 7 May 2014 17:06:38 +0000 Subject: [yaml2obj] Support ELF x86 relocations. llvm-svn: 208228 --- llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml | 43 ++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 llvm/test/Object/X86/yaml2obj-elf-x86-rel.yaml (limited to 'llvm/test/Object') 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 -- cgit v1.2.3