summaryrefslogtreecommitdiff
path: root/test/Object/Inputs
diff options
context:
space:
mode:
authorMatt Beaumont-Gay <matthewbg@google.com>2012-08-02 21:52:49 +0000
committerMatt Beaumont-Gay <matthewbg@google.com>2012-08-02 21:52:49 +0000
commit923123c370bd4c7bf3ec9150b4e0dc042c2f9428 (patch)
treec31f62cc95982c69d1ae1bb11c0fd1717a2fab95 /test/Object/Inputs
parent5c6c128b8162ab23f6330f8b8b5e66494458ec65 (diff)
Move test yaml files under Inputs until they are converted to be the actual
test files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161219 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Object/Inputs')
-rw-r--r--test/Object/Inputs/COFF/i386.yaml83
-rw-r--r--test/Object/Inputs/COFF/x86-64.yaml83
2 files changed, 166 insertions, 0 deletions
diff --git a/test/Object/Inputs/COFF/i386.yaml b/test/Object/Inputs/COFF/i386.yaml
new file mode 100644
index 00000000000..ca902220c13
--- /dev/null
+++ b/test/Object/Inputs/COFF/i386.yaml
@@ -0,0 +1,83 @@
+header: !Header
+ Machine: IMAGE_FILE_MACHINE_I386 # (0x14c)
+
+sections:
+ - !Section
+ Name: .text
+ Characteristics: [IMAGE_SCN_CNT_CODE, IMAGE_SCN_ALIGN_16BYTES, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, ] # 0x60500020
+ SectionData: !hex "83EC0CC744240800000000C7042400000000E800000000E8000000008B44240883C40CC3" # |....D$.......$...............D$.....|
+
+ Relocations:
+ - !Relocation
+ VirtualAddress: 0xe
+ SymbolTableIndex: 5
+ Type: IMAGE_REL_I386_DIR32
+
+ - !Relocation
+ VirtualAddress: 0x13
+ SymbolTableIndex: 6
+ Type: IMAGE_REL_I386_REL32
+
+ - !Relocation
+ VirtualAddress: 0x18
+ SymbolTableIndex: 7
+ Type: IMAGE_REL_I386_REL32
+
+ - !Section
+ Name: .data
+ Characteristics: [IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_ALIGN_1BYTES, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, ] # 0xc0100040
+ SectionData: !hex "48656C6C6F20576F726C642100" # |Hello World!.|
+
+symbols:
+ - !Symbol
+ Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+ NumberOfAuxSymbols: 1
+ AuxillaryData: !hex "240000000300000000000000010000000000" # |$.................|
+
+ - !Symbol
+ Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+ NumberOfAuxSymbols: 1
+ AuxillaryData: !hex "0D0000000000000000000000020000000000" # |..................|
+
+ - !Symbol
+ Name: _main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION # (2)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+
+ - !Symbol
+ Name: L_.str
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+
+ - !Symbol
+ Name: _puts
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+
+ - !Symbol
+ Name: _SomeOtherFunction
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+
diff --git a/test/Object/Inputs/COFF/x86-64.yaml b/test/Object/Inputs/COFF/x86-64.yaml
new file mode 100644
index 00000000000..0b1265f6f5c
--- /dev/null
+++ b/test/Object/Inputs/COFF/x86-64.yaml
@@ -0,0 +1,83 @@
+header: !Header
+ Machine: IMAGE_FILE_MACHINE_AMD64 # (0x8664)
+
+sections:
+ - !Section
+ Name: .text
+ Characteristics: [IMAGE_SCN_CNT_CODE, IMAGE_SCN_ALIGN_16BYTES, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ, ] # 0x60500020
+ SectionData: !hex "4883EC28C744242400000000488D0D00000000E800000000E8000000008B4424244883C428C3" # |H..(.D$$....H.................D$$H..(.|
+
+ Relocations:
+ - !Relocation
+ VirtualAddress: 0xf
+ SymbolTableIndex: 5
+ Type: IMAGE_REL_AMD64_REL32
+
+ - !Relocation
+ VirtualAddress: 0x14
+ SymbolTableIndex: 6
+ Type: IMAGE_REL_AMD64_REL32
+
+ - !Relocation
+ VirtualAddress: 0x19
+ SymbolTableIndex: 7
+ Type: IMAGE_REL_AMD64_REL32
+
+ - !Section
+ Name: .data
+ Characteristics: [IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_ALIGN_1BYTES, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE, ] # 0xc0100040
+ SectionData: !hex "48656C6C6F20576F726C642100" # |Hello World!.|
+
+symbols:
+ - !Symbol
+ Name: .text
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+ NumberOfAuxSymbols: 1
+ AuxillaryData: !hex "260000000300000000000000010000000000" # |&.................|
+
+ - !Symbol
+ Name: .data
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+ NumberOfAuxSymbols: 1
+ AuxillaryData: !hex "0D0000000000000000000000020000000000" # |..................|
+
+ - !Symbol
+ Name: main
+ Value: 0
+ SectionNumber: 1
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_FUNCTION # (2)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+
+ - !Symbol
+ Name: L.str
+ Value: 0
+ SectionNumber: 2
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_STATIC # (3)
+
+ - !Symbol
+ Name: puts
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+
+ - !Symbol
+ Name: SomeOtherFunction
+ Value: 0
+ SectionNumber: 0
+ SimpleType: IMAGE_SYM_TYPE_NULL # (0)
+ ComplexType: IMAGE_SYM_DTYPE_NULL # (0)
+ StorageClass: IMAGE_SYM_CLASS_EXTERNAL # (2)
+