diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/strip/keep_section.txt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/strip/keep_section.txt b/test/strip/keep_section.txt new file mode 100644 index 00000000..0b638f36 --- /dev/null +++ b/test/strip/keep_section.txt @@ -0,0 +1,34 @@ +;;; RUN: %(gen_wasm_py)s %(in_file)s -o %(temp_file)s.wasm +;;; RUN: %(wasm-strip)s --keep-section one %(temp_file)s.wasm -o %(temp_file)s_stripped.wasm +;;; RUN: %(wasm-objdump)s -h %(temp_file)s_stripped.wasm +magic +version +section("one") { "Lorem ipsum dolor sit amet," } +section(TYPE) { count[1] function params[0] results[1] i32 } +section("two") { "consectetur adipiscing elit," } +section(FUNCTION) { count[1] type[0] } +section("three") { "sed do eiusmod tempor incididunt" } +section(EXPORT) { count[1] str("main") func_kind func[0] } +section("four") { "ut labore et dolore magna aliqua." } +section(CODE) { + count[1] + func { + locals[0] + i32.const + leb_i32(-420) + return + } +} +section("five") { "Ut enim ad minim veniam," } +(;; STDOUT ;;; + +keep_section_stripped.wasm: file format wasm 0x1 + +Sections: + + Custom start=0x0000000a end=0x00000029 (size=0x0000001f) "one" + Type start=0x0000002b end=0x00000030 (size=0x00000005) count: 1 + Function start=0x00000032 end=0x00000034 (size=0x00000002) count: 1 + Export start=0x00000036 end=0x0000003e (size=0x00000008) count: 1 + Code start=0x00000040 end=0x00000048 (size=0x00000008) count: 1 +;;; STDOUT ;;) |