Created
May 9, 2020 18:21
-
-
Save bcdroid/57c5cf048c585d60894b2e91c5b7119a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(import "" "f" (func $f (param $n i32) (result i32))) | |
(func $_start (export "_start") (result i32) | |
i32.const 0 | |
call $f | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(module | |
(func $f (export "f") (param $n i32) (result i32) | |
(i32.add (local.get $n) (i32.const 1)) | |
) | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wat2wasm --debug-names --relocatable a.wat | |
wat2wasm --debug-names --relocatable b.wat | |
wasm-ld-11 -o main.wasm a.wasm b.wasm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment