From d3d84fdda185356e8f2a9f660e064427566d9798 Mon Sep 17 00:00:00 2001 From: Derek Schuff Date: Thu, 30 Mar 2017 19:44:09 +0000 Subject: [WebAssembly] Improve support for WebAssembly binary format Mostly this change adds support converting to and from YAML which will allow us to write more test cases for the WebAssembly MC and lld ports. Better support for objdump, readelf, and nm will be in followup CLs. I had to update the two wasm test binaries because they used the old style 'name' section which is no longer supported. Differential Revision: https://reviews.llvm.org/D31099 Patch by Sam Clegg llvm-svn: 299101 --- llvm/test/ObjectYAML/wasm/export_section.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 llvm/test/ObjectYAML/wasm/export_section.yaml (limited to 'llvm/test/ObjectYAML/wasm/export_section.yaml') diff --git a/llvm/test/ObjectYAML/wasm/export_section.yaml b/llvm/test/ObjectYAML/wasm/export_section.yaml new file mode 100644 index 00000000000..1d1a16fb833 --- /dev/null +++ b/llvm/test/ObjectYAML/wasm/export_section.yaml @@ -0,0 +1,27 @@ +# RUN: yaml2obj %s | obj2yaml | FileCheck %s +--- !WASM +FileHeader: + Version: 0x00000001 +Sections: + - Type: EXPORT + Exports: + - Name: foo + Kind: FUNCTION + Index: 0 + - Name: bar + Kind: FUNCTION + Index: 1 +... +# CHECK: --- !WASM +# CHECK: FileHeader: +# CHECK: Version: 0x00000001 +# CHECK: Sections: +# CHECK: - Type: EXPORT +# CHECK: Exports: +# CHECK: - Name: foo +# CHECK: Kind: FUNCTION +# CHECK: Index: 0 +# CHECK: - Name: bar +# CHECK: Kind: FUNCTION +# CHECK: Index: 1 +# CHECK: ... -- cgit v1.2.3