From 274264ce2ba93d26702f7ebfe6aea121df44113f Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 13 Jun 2013 22:19:48 +0000 Subject: [yaml2obj] Initial ELF section support. The current functionality is extremely basic and a bit rough around the edges, but it will flesh out in future commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183953 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Object/lit.local.cfg | 2 +- test/Object/yaml2obj-elf-section-basic.yaml | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/Object/yaml2obj-elf-section-basic.yaml (limited to 'test/Object') diff --git a/test/Object/lit.local.cfg b/test/Object/lit.local.cfg index b2439b2d1b..d74d039d68 100644 --- a/test/Object/lit.local.cfg +++ b/test/Object/lit.local.cfg @@ -1 +1 @@ -config.suffixes = ['.test', '.ll'] +config.suffixes = ['.test', '.ll', '.yaml'] diff --git a/test/Object/yaml2obj-elf-section-basic.yaml b/test/Object/yaml2obj-elf-section-basic.yaml new file mode 100644 index 0000000000..6d40952ec0 --- /dev/null +++ b/test/Object/yaml2obj-elf-section-basic.yaml @@ -0,0 +1,23 @@ +# RUN: yaml2obj -format=elf %s | llvm-readobj -sections - | FileCheck %s +!ELF +FileHeader: + Class: ELFCLASS64 + Data: ELFDATA2LSB + Type: ET_REL + Machine: EM_X86_64 +Sections: + - Name: .text + Type: SHT_PROGBITS + Flags: [ SHF_ALLOC, SHF_EXECINSTR ] + +# CHECK: Section { +# CHECK: Index: 0 +# CHECK: Type: SHT_NULL (0x0) +# +# CHECK: Section { +# CHECK: Name: .text +# CHECK: Type: SHT_PROGBITS (0x1) +# CHECK-NEXT: Flags [ (0x6) +# CHECK-NEXT: SHF_ALLOC (0x2) +# CHECK-NEXT: SHF_EXECINSTR (0x4) +# CHECK-NEXT: ] -- cgit v1.2.3