mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 15:22:15 +00:00
[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.
This commit is contained in:
parent
8116ebcd0c
commit
c185c68dd0
@ -951,10 +951,6 @@ var ffi = (function() {
|
||||
if (arguments.length < 1)
|
||||
throw new Error('Expected at least one wasm module to load.');
|
||||
|
||||
if (arguments[0] == '--dump-ffi-symbols') {
|
||||
for (var name in ffi["env"])
|
||||
print(name)
|
||||
} else {
|
||||
function load_wasm(file_path) {
|
||||
// TODO this should be split up in load, check dependencies, and then resolve
|
||||
// dependencies. That would make it easier to do lazy loading. We could do
|
||||
@ -1035,4 +1031,3 @@ if (arguments[0] == '--dump-ffi-symbols') {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
34
arch/wasm32/wasm.syms
Normal file
34
arch/wasm32/wasm.syms
Normal file
@ -0,0 +1,34 @@
|
||||
# Symbols we want wasm.js to define at runtime
|
||||
_Exit
|
||||
abort
|
||||
puts
|
||||
|
||||
# Musl syscall interface, provided by wasm.js
|
||||
__syscall
|
||||
__syscall0
|
||||
__syscall1
|
||||
__syscall2
|
||||
__syscall3
|
||||
__syscall4
|
||||
__syscall5
|
||||
__syscall6
|
||||
__syscall_cp
|
||||
|
||||
# Symbols not supported by clang but currently expected to work on the
|
||||
# wasm waterfall
|
||||
# TODO(sbc): remove these
|
||||
__builtin_isinff
|
||||
__builtin_isinfl
|
||||
__builtin_clrsb
|
||||
__builtin_clrsbl
|
||||
__builtin_clrsbll
|
||||
__builtin_apply
|
||||
__builtin_apply_args
|
||||
__builtin_malloc
|
||||
|
||||
# Part of musl we still don't compile for wasm
|
||||
__lock
|
||||
__unlock
|
||||
__set_thread_area
|
||||
setjmp
|
||||
longjmp
|
Loading…
x
Reference in New Issue
Block a user