2b2b3bdbe3
[WebAssembly] wasm.js: use explicity variable for main_module ( #43 )
2018-01-22 15:18:08 -08:00
c93b284f39
[WebAssembly] Add call to __wasm_call_ctors on startup if found ( #42 )
2018-01-18 12:36:54 -08:00
ac877172c1
[WebAssembly] Add stub for _Unwind_ForcedUnwind ( #41 )
2018-01-17 19:24:15 -08:00
b93ae1f7eb
[WebAssembly] Add TODO
2018-01-17 14:38:49 -08:00
dbd68988a8
[WebAssembly] Update PAGE_SIZE for 64k
...
See: 910e3cace5/Semantics.md (resizing)
2018-01-16 17:23:54 -08:00
9064441edc
[WebAssembly] Support grow memory in brk() ( #39 )
2018-01-16 17:20:44 -08:00
ddb01fbf88
handle oom
2018-01-13 09:23:30 -08:00
3ce20a9f57
[WebAssembly] wasm.js: implement brk
2018-01-13 08:47:42 -08:00
0c827335e4
[WebAssebmly] Implement a_cas() in arch/wasm32/atomic_arch.h ( #36 )
2018-01-13 08:46:40 -08:00
0bf0e9f1fe
wasm.js: Add unwind symbols needed by libc++abi ( #35 )
2018-01-11 15:21:59 -08:00
4b17a3b40c
Rename wasm.syms -> libc.imports ( #34 )
2018-01-11 14:33:17 -08:00
190dffd141
remove extra logging
2017-12-15 13:23:12 -08:00
4b606b59d4
Support node.js in wasm loader
...
The latest LTS of Node supports wasm, and this allows us to test
against it, as well as the shells.
2017-12-13 15:53:52 -08:00
c34cb0b46a
[WebAssembly] Remove empty headers
...
These are provided by arch/generic.
2017-11-30 15:14:40 -08:00
2b92b728e3
Merge remote-tracking branch 'upstream/master' into HEAD
2017-11-29 15:46:05 -08:00
b49da62f23
Implement writv syscall so that musl printf works ( #26 )
2017-11-20 17:13:33 -08:00
6a45034cab
[WebAssembly] Cleanup syscall handling in wasm.js ( #25 )
...
Also, ignore a couple of syscall by return 0 rather
than -1. This allows the musl startup code to get
furthur.
2017-11-17 17:01:15 -08:00
0f2a7be58e
[WebAssembly] Add syscall numbers of wasm.js ( #23 )
...
I verified that this change doesn't change the list
of failing tests on the wasm waterfall.
2017-11-16 12:28:18 -08:00
9f20a8a3c2
[WebAsembly] Build thread code ( #22 )
2017-11-15 15:58:02 -08:00
c185c68dd0
[WebAssembly] Use hardcoded list expected undefined symbols ( #21 )
...
Rather than generate wasm.syms from wasm.js (which includes
a huge superset of the number of symbols actaully expected
to be undefined at link time) simply hardcode that list as
a test file, which lld can read.
2017-11-07 15:17:25 -08:00
8116ebcd0c
[WebAssembly] Fix shared library loading ( #17 )
...
Loading of shared libraries was broken back in:
39fde60
This change restores the ability for shared libraries to
be loaded such that they can share memory and provide
function exports to the main executable.
However the executable that libraries still need to built
in a specific way (i.e. all importing the same sized memory)
and their static globals need to be in the different address
range. This has the complication that the executables won't
run the wasm spec interpreter (since it doesn't pass in a
memory to the executables it runs). So although I'm fixing this
here in the musl repo I'm also proposiing that we remove the
continuous testing of this configurations on the wasm waterfall
in favor of concentrating on the statically linking lld case:
WebAssembly/waterfall#271
2017-11-06 14:18:53 -08:00
e7fb361e60
[WebAssembly] Fix bug in wasm.js version of strchr
2017-11-03 17:46:28 -07:00
319abd03d4
Add --dump-ffi-symbols argument to wasm.js ( #5 )
...
This allows a list of all symbols exports by wasm.js to be
generated which is usefull for passing to my prototype of
lld which takes an --allow-undefined-symbols=<filename>
argument.
2017-10-30 17:37:48 -07:00
a7161e9449
[WebAssembly] Exclude less in libc.py
2017-10-27 14:39:51 -07:00
46cf4c8640
Merge pull request #11 from sbc100/add_letf2
...
[WebAssembly] Add llvm builting '__letf2' to wasm.js
2017-10-20 16:46:44 -07:00
96aea19aae
[WebAssembly] Updaet alltypes.h.in
2017-10-20 16:21:39 -07:00
addf7f9215
[WebAssembly] Add llvm builting '__letf2' to wasm.js
2017-10-20 13:33:55 -07:00
94500fb127
[WebAssembly] Enable building with 'make' command
...
This change enables all of the .c sources in musl
be built with the clang -target wasm32-unknown-unknown-wasm
2017-10-19 17:42:50 -07:00
30930bef22
Fix bugs in strcmp/strncmp/strchr
...
Added strcmp/strncmp implementations that follow the libc spec, and
fixed a bug in strchr. This makes a couple more tests pass in Wasm
waterfall.
2017-08-22 15:46:51 -07:00
128cf2eece
Use read if readbuffer is unavailable
2017-01-02 15:10:34 -08:00
39fde6042e
Update wasm.js loader to use new WebAssembly JS API
2016-10-26 13:34:58 -07:00
2a717f2d43
Add __stdio_write and __stdout_write to musl_hack list of imports
...
They are now imported because they are address-taken
2016-07-14 09:11:35 -07:00
cff987a27b
Update wasm.js for v8's change to 2-level FFI namespace
2016-03-08 15:30:28 -08:00
cd50df76d4
Use the new exports table on the wasm module object
2016-02-29 13:45:25 -08:00
3f4c233ac0
Use 16MB for the linear memory array buffer
...
Some of the torture tests use big stacks, and 16 is enough larger than 2.
2016-02-18 15:35:14 -08:00
1648814783
Add clrsbl clrsbll as well
2016-02-14 14:08:20 -08:00
49dbb74456
Add __builtin_clrsb as NYI
...
builtin-bitops-1.c now hits it.
2016-02-13 13:57:29 -08:00
968d8d2158
Improve trap handling, fix isspace.
2016-02-03 08:30:55 -08:00
7f1742a8c3
Fix reference error.
2016-02-03 04:26:30 -08:00
682407e272
dlsym: use same pattern as other loader
...
It's still broken because call_indirect requires a function in the same module.
2016-02-01 09:22:50 -08:00
8bbb33957b
Handle main() not returning EXIT_SUCCESS.
2016-02-01 08:26:21 -08:00
f73845c1b8
Typo.
2016-02-01 08:05:12 -08:00
acc1d6453b
dlfcn.h implementation and detailed example.
2016-02-01 08:00:42 -08:00
13f9666606
Stub dlfcn.h
2016-02-01 04:54:06 -08:00
26e7adf5d0
wasm objects don't have hasOwnProperty and functions aren't Function
2016-01-31 02:49:24 -08:00
ae7274db9b
Add a few todos.
2016-01-30 14:12:19 -08:00
f11387c0bb
Return -1 from syscall stubs.
2016-01-30 13:45:37 -08:00
e1f64b81c3
Add wasm.js
...
Imported from: https://github.com/WebAssembly/waterfall/blob/master/src/test/wasm.js
Hash: 8074c23c566a65f32d6b7fac065abf1ffca95473
2016-01-30 09:08:51 -08:00
0861c7123e
Hack around the import argument mismatch
...
sexpr-wasm rightfully complained that the imports weren't called with the right signatures. I'm not sure how the syscall macro layering works, but this hack works for now.
2016-01-30 06:45:11 -08:00
52a00611c2
Hack around syscalls.
2016-01-30 02:27:36 -08:00