summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2021-09-10 10:35:44 -0700
committerGitHub <noreply@github.com>2021-09-10 17:35:44 +0000
commit6c065379fcc991173fcfd6ed4cfb56cfa98a19d5 (patch)
treedf252b4a047b88e105193497b6555b6cfec014e9 /test
parente6f8295e0fdda04792ddde5d019703537662f54c (diff)
downloadwabt-6c065379fcc991173fcfd6ed4cfb56cfa98a19d5.tar.gz
wabt-6c065379fcc991173fcfd6ed4cfb56cfa98a19d5.tar.bz2
wabt-6c065379fcc991173fcfd6ed4cfb56cfa98a19d5.zip
Support new dylink custom section format (#1707)
This section is now based on sub-sections making it more extensible. See also: llvm change: https://reviews.llvm.org/D109595 binaryen change: https://github.com/WebAssembly/binaryen/pull/4141
Diffstat (limited to 'test')
-rw-r--r--test/binary/dylink0-section.txt37
-rwxr-xr-xtest/gen-wasm.py4
2 files changed, 41 insertions, 0 deletions
diff --git a/test/binary/dylink0-section.txt b/test/binary/dylink0-section.txt
new file mode 100644
index 00000000..cca559b6
--- /dev/null
+++ b/test/binary/dylink0-section.txt
@@ -0,0 +1,37 @@
+;;; TOOL: run-objdump-gen-wasm
+;;; ARGS: -x
+magic
+version
+section("dylink.0") {
+ section(DYLINK_MEM_INFO) {
+ mem_size[5]
+ mem_align[1]
+ table_size[3]
+ table_align[2]
+ }
+
+ section(DYLINK_NEEDED) {
+ needed_count[2]
+ str("libfoo.so")
+ str("libbar.so")
+ }
+}
+(;; STDOUT ;;;
+
+dylink0-section.wasm: file format wasm 0x1
+
+Section Details:
+
+Custom:
+ - name: "dylink.0"
+ - mem_size : 5
+ - mem_p2align : 1
+ - table_size : 3
+ - table_p2align: 2
+ - needed_dynlibs[2]:
+ - libfoo.so
+ - libbar.so
+
+Code Disassembly:
+
+;;; STDOUT ;;)
diff --git a/test/gen-wasm.py b/test/gen-wasm.py
index 13818620..da8838ef 100755
--- a/test/gen-wasm.py
+++ b/test/gen-wasm.py
@@ -77,6 +77,10 @@ NAMED_VALUES = {
'LINKING_COMDAT_INFO': 7,
'LINKING_SYMBOL_TABLE': 8,
+ # dylink.0 subsection codes
+ 'DYLINK_MEM_INFO': 1,
+ 'DYLINK_NEEDED': 2,
+
# external kinds
'func_kind': 0,
'table_kind': 1,